fix(v2): show read and search tool activity accurately - #13375
Conversation
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: unavailable · PR result: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This is a broad cross-layer change to provider projections, shared activity classification, and web/mobile rendering, including a changed internal representation for read operations. Although well covered by tests and focused on correcting activity display, the breadth and existing-path behavior changes warrant human review. You can add or adjust custom eligibility rules. Learn more. |
6448cfe to
1563a64
Compare
a3dbb1a to
de0d359
Compare
fe4f6ad to
87c67bd
Compare
de0d359 to
9d99ae3
Compare
9d99ae3 to
be5b71c
Compare
juliusmarminge
left a comment
There was a problem hiding this comment.
Thanks, the read/search labels are a real improvement, and the change is still needed on the current V2 branch. None of the ~90 commits since your base touched read/search classification: Claude Grep still renders as "Grep" with a wrench, and Cursor/Grok reads still show as "Searched files".
I merged the current t3code/codex-turn-mapping head into a scratch copy of this branch. It merges cleanly, and I found no semantic conflicts with what landed since (#13725 folds, #13790 stopped rows, #13806 Cursor stopped status, the per-turn item-ordinal maps). On that merge, tsc is clean in all six packages, the PR's own tests pass (web 180, mobile 75, client-runtime 93, shared 8, adapters 339), the replay suite is 96/96, and knip is clean. The only textual conflict is with the open #13140, in workEntryDisplayLabel.
Two things need fixing before merge (inline):
- Mobile approval rows regress. A file-read approval shows "Read file" instead of its prompt and can't be expanded, and command/file-change approvals summarize as "Ran 1 command, changed 1 file" although nothing ran.
- OpenCode
codesearchis not a file search. It was a web code-context tool (query + tokens, no path), OpenCode removed it upstream in May, and 1.18.32 doesn't ship it. The test invents apathfor it.
Smaller, non-blocking notes are inline too: two pieces of dead code, a lone web search losing its "Web search" label, multi-line approval prompts, and MCP tool names.
On tests: nothing in the replay suite asserts the new "Read …" / "Searched …" titles. Adding title assertions to the tool_call_read_only Claude and Cursor replay outputs would prove the change better than the new adapter unit tests, and OpenCode read/grep have no replay coverage at all. The ACP mock-agent frames for late locations and empty rawInput resends don't appear in any of the 23 recorded Grok/registry transcripts, so I'd drop them unless a real transcript shows them.
Not verified: live providers and a real web/mobile UI pass.
OpenCode's codesearch was Exa's web code-context API and the adapter already gates it as a network tool, so it should not project as a workspace file search. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…yash/v2-port-fixes
Approvals and questions describe requested work, so they no longer classify as commands, edits, or reads. Mobile only applies the read label and path-only expansion to dynamic tool reads, so a file-read approval keeps its prompt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Drop ACP tool-call identity checks that V2 never reaches, and the mock-agent frames no recorded transcript shows. - Remove unreachable Cursor read branches in the search helpers. - Leave server-prefixed MCP tool names unclassified. - Keep multi-line prompts as labels; only search output is skipped. - Restore the heading for a lone web search row. - Cover OpenCode read and grep titles in the adapter test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
File search items only carry the pattern, so recomputing the label on the client dropped the "in <dir>" part the adapter already put in the item title. Web and mobile now use that title for file search rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
V2 loses or mislabels some provider tool calls. Read and search activity can appear as a generic
---file, a write, or a tool with no useful path. Expanded read entries can show file contents or projection metadata instead of the request and result.Preserve structured tool inputs through the ACP, Claude, Cursor, and OpenCode adapters. Classify read and search calls from their tool identity and arguments, then show clear titles, paths, and expanded details in web and mobile. Keep grouped tool rows aligned with the corrected labels. OpenCode
codesearchnow emits a code search turn item, whilewebsearchremains a web search.Before and after
These screenshots use a seeded local Cursor activity thread. The web and mobile captures cover the visible group summary, tool classification, and expanded read and search details.
Web group summary
Web expanded tool details
Mobile tool rows
Mobile expanded read
Verification
codesearchandwebsearchpair.git diff --checkpassed.Model: GPT-6. Harness: Codex.