fix(client): keep Grok tool names across ACP tool_call_update patches - #2388
Open
L42y wants to merge 1 commit into
Open
fix(client): keep Grok tool names across ACP tool_call_update patches#2388L42y wants to merge 1 commit into
L42y wants to merge 1 commit into
Conversation
ACP completions often omit title and x.ai/tool meta. Merge by toolCallId so the Working lane does not overwrite a real name with grok:unknown.
10 tasks
yuezengwu
approved these changes
Sep 4, 2026
yuezengwu
left a comment
Contributor
There was a problem hiding this comment.
Approved exact head 785dc09b099777d8b54908e0f5712125b9feeb25.
The replacement PR uses the compliant fix/grok-unknown-tool-merge branch, and its CI run 33833392072 is fully green. The implementation preserves last-known Grok tool metadata across title-less ACP completion patches without weakening the existing replay/effect classification.
Independent validation on this exact head passed: git diff --check, pnpm check, build (5/5), typecheck (9/9), and 91 focused Grok tests. The same exact head also passed the full client suite (2,898 passed, 7 skipped) during the immediately preceding review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tool_call_updateis a patch: later completed/failed updates often send onlystatus+rawOutputand omittitle/_meta["x.ai/tool"].grok:unknown. The Working lane then kept the latest row pertoolUseId, so a nameless completion overwrote a good start name.GrokToolInfobytoolCallIdbefore emitting session events. Keepgrok:unknownonly when that id has never had a name or title.This replaces #2387. Same exact head
785dc09b099777d8b54908e0f5712125b9feeb25; the previous PR was blocked becausejeremy/grok-unknown-tool-mergeis not a required branch prefix.Validation
biome checkon the four changed Grok filesgit diff --check,pnpm check, build (5/5), typecheck (9/9), 91 focused Grok tests, full client suite (2,898 passed, 7 skipped)pnpm --filter @first-tree/client exec vitest run src/providers/grok/__tests__/events.test.ts src/providers/grok/__tests__/handler.test.ts(91 passed)Change Surface
apps/clipublic CLI or help outputNotes
TOOL_VERBSmapping for Grok names (run_terminal_cmd/run_terminal_command) so shells render asrun <command>instead ofuse <title>