Skip to content

fix(core): keep turn tools stable - #312

Merged
jyecusch merged 3 commits into
mainfrom
stable-turn-tools
Oct 6, 2026
Merged

jyecusch merged 3 commits into
mainfrom
stable-turn-tools

Conversation

@jyecusch

@jyecusch jyecusch commented Oct 6, 2026

Copy link
Copy Markdown
Member

Fixes SUGA-1953.

The tools sent to the model come first in the provider's cached prompt, so any change to them mid-thread loses the cache for the whole of a long thread. A turn now sends the same tools whatever changes around it:

  • web_fetch and web_search are always offered. While the workspace has no search provider, or the agent has a tool switched off, calls are refused.
  • search_history is always offered, with a description that no longer names the compaction time. Before any compaction it says the whole thread is already in view.
  • collaborate is always offered. With no other agents in the pod, calls are refused.
  • Each connection's tool list is kept between turns while it's fresh and the connection is unedited, so a turn that calls no connection tool makes no request to its server.

save_instructions still appears only during an agent's interview. The interview's end replaces the system prompt, which loses the cache anyway.

@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 695cdcc Oct 06 2026, 09:33 AM

@jyecusch
jyecusch added this pull request to stack #315 October 6, 2026 10:24
@jyecusch
jyecusch merged commit 8b80288 into main Oct 6, 2026
7 checks passed
@jyecusch
jyecusch deleted the stable-turn-tools branch October 6, 2026 11:04
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