Skip to content

log executeCode return values - #300

Open
maxwellpeterson wants to merge 1 commit into
mainfrom
mpeterson/execute-code-return-values
Open

log executeCode return values#300
maxwellpeterson wants to merge 1 commit into
mainfrom
mpeterson/execute-code-return-values

Conversation

@maxwellpeterson

@maxwellpeterson maxwellpeterson commented Aug 21, 2026

Copy link
Copy Markdown
Member

Kimi likes to return values when using the executeCode tool instead of logging them. Return values are currently discarded, which causes confusion. We can automatically log them instead.

This is probably a better alternative to #299

Fixes #209

@github-actions github-actions Bot added kernel Changes to the Workshop kernel gatekeeper Changes to a gatekeeper integration labels Aug 21, 2026
@github-actions

Copy link
Copy Markdown

Preview: pr300-mpeterson-exe-a7d98d39

https://pr300-mpeterson-exe-a7d98d39-router.cloudflare-os-previews.workers.dev

Dashboard · deleted when this PR closes

@maxwellpeterson
maxwellpeterson marked this pull request as ready for review August 21, 2026 19:28
}
await agent(self, env, this.ctx);
let result = await agent(self, env, this.ctx);
if (result !== undefined) console.log(result);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the agent is doing something sensitive like fetching the body of a secure document, won't this mean its captured in chat output? There's no way to opt in/out?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why the agent would return a value it didn't want to appear in the tool output. I added a line to the tool description to make this behavior more explicit, but I don't think we need an opt in/out mechanism here.

@maxwellpeterson
maxwellpeterson force-pushed the mpeterson/execute-code-return-values branch from bf9da6a to 60cdb65 Compare August 21, 2026 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gatekeeper Changes to a gatekeeper integration kernel Changes to the Workshop kernel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

executeCode can drop module return values

2 participants