rivet-dev / rivet-dev/agentos

Claude agent: assistant text after a tool call must be emitted (turn shape "text → tool call → final text")

Open
#1,836 0 comments 0 reactions 0 assignees View on GitHub

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), a turn shaped "assistant text → tool call → final assistant text" lost the final text: it was never emitted as agent_message_chunk, so the client only saw the tool call finish with no answer. This is a common shape for MCP tool usage. Root cause there: a sawAssistantText duplicate-suppression flag was set by the pre-tool text and never reset on tool_use, so all subsequent assistant text in the turn was dropped as a duplicate.

Request

  • Confirm the packaged Claude agent on current main streams the final text for this turn shape.
  • Add a regression test for it — the bug is easy to reintroduce with any duplicate-suppression logic between stream_event partials and full assistant messages.
  • If the same defect exists in the current adapter, please fix it.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the packaged Claude agent's handling of stream_event partials, full assistant messages, and tool_use events. Reproduce the assistant text → tool call → final text turn, then add a regression test showing that the final text is emitted as agent_message_chunk and verify the current adapter behavior.

Written by the indexing model from the issue text.

Assessment

Domain
ai
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.