Repository navigation
Show the server's friendly tool label in the chat status line - #351
allenhutchison wants to merge 5 commits into
Conversation
The tool_call frame may now carry an optional label (pepper#6981). When present the REPL and TUI show it, and keep it through the tool result; otherwise they fall back to "Calling <name>…" as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QNDeh7wecn3qTjRXGckqBt
Vycari ReviewRound 5 on 1572045. The verdict is the Vycari Review check run, and each open finding is an inline thread. Reply on every P0 and P1 thread: Open: P0 0 · P1 0 · P2 0 · disputed 0 · confirmed fixed 0 · withdrawn 0 Hand-off: Covered: no Greptile round needed (Greptile's passing review of bd0cc03 still covers this head). Greptile follow-through
No open findings this round. P2s, judge's notes and closed findingsJudge's notes The PR is clean at this head. Greptile's "Completed tools look active" finding is fixed: both the TUI and REPL status lines now count labelled calls per tool instead of remembering every tool name that ever had a label, and no new candidates survived. |
|
@greptileai review |
… too Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QNDeh7wecn3qTjRXGckqBt
A blank label no longer holds a result back, and a result for a tool whose call carried no label (a local tool, an unlabelled parallel call) still shows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QNDeh7wecn3qTjRXGckqBt
|
@greptileai review |
| if turns.tool_label(payload) is not None: | ||
| self._labelled.add(str(payload.get("name"))) |
There was a problem hiding this comment.
_labelled remembers a tool name for the whole turn. If a labelled call finishes and the same tool is called again without a label, the second call shows Calling <name>…, but its result is skipped because the name is still in the set. The completed tool then looks active until another status arrives. This also affects the REPL sink.
Track whether the matching call had a label, rather than whether that tool name ever had one.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/pepper_cli/tui/app.py
Line: 3300-3301
Comment:
**Completed tools look active**
`_labelled` remembers a tool name for the whole turn. If a labelled call finishes and the same tool is called again without a label, the second call shows `Calling <name>…`, but its result is skipped because the name is still in the set. The completed tool then looks active until another status arrives. This also affects the REPL sink.
Track whether the matching call had a label, rather than whether that tool name ever had one.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.There was a problem hiding this comment.
Fixed in cb2ccd3. Both sinks now count labelled calls by tool name that are still waiting on their result, and each held-back result uses up one count. Once a labelled call's result has come back, a later unlabelled call of the same tool shows its result, while interleaved parallel calls still never bring a labelled tool's raw name back. test_a_later_unlabelled_call_of_the_same_tool_still_shows_its_result covers it.
Generated by Claude Code
… turn A later unlabelled call of the same tool now shows its result. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QNDeh7wecn3qTjRXGckqBt
…-50qlxh-toolnames # Conflicts: # tests/test_chat_spinner.py
Human overview
The server now sends a friendly phrase with each tool call ("Searching your email" instead of
search_gmail_messages; pepper#6981, behind thefriendly-tool-namesrollout). This makes the REPL and TUI status line show that phrase when it is present, and keep it while the tool runs. With no label, the status line still reads "Calling …", as it does today.Human required (optional)
AI reviewer
Details for agents: what the diff does, invariants, verification, checklist
turn.py: addstool_call_status(payload), which returns"<label>…"whenlabelis a non-blank string and otherwise"Calling <name or 'a tool'>…". It also addstool_result_status(payload), the existingname → statusline pulled out so both sinks share it.cli.py_ReplTurnSinkandtui/app.py_TurnStatus:tool_callusestool_call_statusand records whether a label was shown.tool_resultskips thename → statusupdate after a labelled call, so the friendly words stay up until the next frame replaces them. Unlabelled calls behave exactly as before.labelis an additive, optional field on thetool_callSSE frame. The CLI reads it with.getand treats a missing or blank value as absent. No mirrored dataclass changes, sotests/test_api_contract.pyis unaffected, and frame payloads are dicts here, so the vendored snapshot needs no refresh. The client does no gating of its own: the server decides per person whether to send a label.uv run --frozen ruff format --check .(161 files already formatted),uv run --frozen ruff check .(all checks passed),uv run --frozen ty check src/pepper_cli/(all checks passed),uv run --frozen pytest -n auto -q(3720 passed, 2 skipped).test_tool_call_status_prefers_the_servers_label(label, blank label, no label, empty payload),test_a_labelled_tool_call_shows_the_servers_words_and_keeps_them(REPL spinner),test_a_labelled_tool_call_holds_its_words_through_the_result(TUI).Checklist (repo-specific)
uv run ruff format --checkanduv run ruff checkclean (no new lint ignores)uv run ty check src/pepper_cli/cleanuv run pytestpasses; coverage floor in.claude/maintainerd.jsonnot lowered/api/v1usage stays additive-only,# MIRROR:comments updated, unknown fields and frames still tolerated (no mirrored model touched)SKILL.mdupdated if commands or output changed: N/A, no command changed and neither documents the status line texthelp/cli.mdupdated for a new or changed command, or not user-facing because only the transient status line wording changesGenerated by Claude Code


Confidence Score: 5/5
The PR appears safe to merge, with one non-blocking status-line issue for repeated tool calls.Fix with agent prompt
Summary
The PR shows the server’s friendly tool labels in the REPL and TUI status lines.
Reviews (2) · Last reviewed commit: "Key the label hold by tool name, and tre..." · Reviewed by Greptile