Skip to content

fix(d-pi): remote_* tools return native AgentToolResult directly#48

Open
sheason2019 wants to merge 1 commit into
mainfrom
fix/remote-tool-return-value
Open

fix(d-pi): remote_* tools return native AgentToolResult directly#48
sheason2019 wants to merge 1 commit into
mainfrom
fix/remote-tool-return-value

Conversation

@sheason2019

Copy link
Copy Markdown
Owner

remote_bash/remote_read/... were wrapping the executor result in a JSON.stringify text block, creating double-nested JSON the LLM could not parse.

The executor runner already returns the native tool's execute() return value (a valid AgentToolResult with content + details). The remote wrapper just needs to pass it through.

remote_bash/remote_read/... were wrapping the executor result in a
JSON.stringify text block, creating double-nested JSON the LLM
could not parse. The executor runner already returns the native
tool's execute() return value (a valid AgentToolResult with content
+ details) — the remote wrapper just needs to pass it through.

Before: r.result = {content:[...], details:{...}}
        return {content:[{text: JSON.stringify(r.result)}], details:{}}
        → LLM sees: {"content":[{"type":"text","text":"{\"content\":[...] }"}]}

After:  r.result = {content:[...], details:{...}}
        return r.result
        → LLM sees the native tool output directly
@sheason2019 sheason2019 force-pushed the fix/remote-tool-return-value branch from 52485a8 to b4f99d4 Compare June 17, 2026 03:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant