Skip to content

fix(core): keep a long tool result as a file and give the model its start - #321

Merged
tjholm merged 1 commit into
read-file-toolfrom
cap-tool-results
Oct 9, 2026
Merged

tjholm merged 1 commit into
read-file-toolfrom
cap-tool-results

Conversation

@tjholm

@tjholm tjholm commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Fixes SUGA-1956.

A tool result over 50,000 characters is kept as a thread file, and the model gets its start and the file's id to read on with read_thread_file. The tool_call row still keeps the whole output. JSON, including an MCP server's one-line JSON text, is pretty-printed so the file has lines to page through.

Stack created with GitHub Stacks CLI • Give Feedback 💬

@tjholm
tjholm added this pull request to stack #322 October 6, 2026 23:28
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
sugabots-website 85c43c6 Oct 08 2026, 11:25 PM

Comment thread packages/core/src/conversations/turns/tool-calls/large-results.ts
@tjholm
tjholm merged commit 133b86f into main Oct 9, 2026
7 of 13 checks passed
@tjholm
tjholm deleted the cap-tool-results branch October 9, 2026 00:32
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