Claude agent: complete each tool call when its tool_result arrives, not in bulk at end of turn
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 4.6k
- Forks
- 251
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 34
Description
Problem
With the 0.1.x adapter (@rivet-dev/agent-os-claude), SDK user messages carrying tool_result blocks were ignored; active tool calls were only completed in bulk at the end of the turn. For a client rendering tool-call cards this looks wrong for both sequential and parallel tool use: a tool that finished in 1s stays "running" for the whole turn (which can be minutes), users cannot tell which tool is actually in flight, and every call then flips running → completed at the same instant.
Request
- Each tool call should transition to completed/failed as soon as its
tool_resultarrives (is_errormapped to failed), with end-of-turn bulk completion kept only as a fallback for leftovers. - Please confirm the packaged Claude agent on current main behaves this way; if it still completes in bulk, please fix it.
- A regression test with two tool calls finishing at different times would lock the behavior in.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Inspect the 0.1.x @rivet-dev/agent-os-claude adapter and its handling of SDK user messages containing tool_result blocks. Reproduce sequential and parallel tool calls with different completion times, then verify each result transitions its call to completed or failed immediately while end-of-turn completion handles only leftovers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- ai, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100