Skip to content

fix(prompt_agent): a conversation's tool_call_count sums its turns - #220

Merged
kaihackney-scale merged 1 commit into
mainfrom
kai/prompt-agent-conversation-tool-calls-v2
Oct 15, 2026
Merged

kaihackney-scale merged 1 commit into
mainfrom
kai/prompt-agent-conversation-tool-calls-v2

Conversation

@kaihackney-scale

@kaihackney-scale kaihackney-scale commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

A multi-turn prompt_agent (a user-sim conversation) recorded the last turn's tool_call_count on its PromptResponse, because each turn's terminal message reports only that turn's tool calls. A three-turn run with 3 + 39 + 19 calls reported 19, and every consumer of the stored count showed it: the run list in the Advanced MCP Viewer, the hub, and QC evidence. The count is now the sum over turns, and stays None when no turn reports one, so agents that don't report it are unchanged. Single-turn runs record the same value as before.

Validation: new unit tests run a mocked three-turn user-sim conversation (3 + 39 + 19 = 61; a turn without a count adds nothing; no counts stays None); the first two fail without the fix. All prompt_agent unit tests and ruff pass. Runs recorded before this keep their stored last-turn count.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no actionable issues were found.

Summary

prompt_agent now stores the sum of reported solver tool calls across conversation turns.

  • Prompt responses show tool calls from every conversation turn.

Reviews (1) · Last reviewed commit: "fix(prompt_agent): a conversation's tool..." · Reviewed by Greptile

Each turn's terminal message reports only that turn's tool calls, and the
PromptResponse recorded the last one, so a three-turn user-sim run with
3 + 39 + 19 calls reported 19. The count is now the sum over turns, and stays
None when no turn reports one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kaihackney-scale
kaihackney-scale requested a review from a team as a code owner October 15, 2026 05:54
@kaihackney-scale
kaihackney-scale merged commit ee6ce24 into main Oct 15, 2026
14 checks passed
@kaihackney-scale
kaihackney-scale deleted the kai/prompt-agent-conversation-tool-calls-v2 branch October 15, 2026 20:56
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.

2 participants