You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add a run-scoped stop after the current tool call completes #47045
A local watchdog can detect that an AI provider is approaching a usage or billing limit. It needs to let a tool that is already running finish, then stop the turn before the provider can start another model request or tool call. An immediate interrupt can cut a write operation in half. Waiting for the full turn can allow more requests. Polling the activity log and interrupting leaves a race between tool completion and the next request.
Could T3 expose a run-scoped drain operation through the orchestrator or CLI? It would:
Take an expected run ID and an idempotency key. Reject stale requests without affecting a replacement run.
Let in-flight foreground tools finish and record their results, then prevent the next model request or tool dispatch. Return an explicit unsupported result for provider adapters that cannot enforce the boundary.
Expose whether the drain is pending or terminal, so a client can select another provider and resume the same thread safely.
A test could request a drain while the first of two synthetic tool calls is in flight, then assert the first result is recorded and the second call never starts. A stale-run case should confirm a replacement run remains untouched.
Thanks for writing this up. It asks for new behaviour rather than reporting a defect, so it does not belong in the bug tracker and I'm closing it as not planned here. Feature ideas are discussed in Discussions: please post it there.
Activity
juliusmarminge commentedon Dec 1, 2026
Thanks for writing this up. It asks for new behaviour rather than reporting a defect, so it does not belong in the bug tracker and I'm closing it as not planned here. Feature ideas are discussed in Discussions: please post it there.