GeezerVison is showing github.com — feat(server): show Grok subagents in the Agents panel by t3dotgg · Pull Request #6410 · pingdotgg/t3code
Conversation
t3dotgg
commented
Aug 13, 2026
•
edited by macroscopeapp
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Grok already emits subagent spawn and finish on _x.ai/session/update. T3 ignored them, so a 13-child session only showed fat spawn_subagent tool rows.
Those events now become task.started and task.completed with role, model, duration, token count, and a truncated result. The Agents panel is the same fold Claude and Codex already use. The spawn_subagent tool row is dropped.
Stacked on #6383.
Made with Grok 4.6.
Note Low Risk
Adapter-only event mapping with unit/integration tests; no auth or persistence changes.
Overview
Grok’s _x.ai/session/update subagent_spawned and subagent_finished notifications are now handled in the Grok ACP adapter and surfaced as task.started / task.completed runtime events (same path Claude and Codex use for the Agents panel).
Spawn payloads carry role, model, and description; finish payloads carry normalized status, truncated output summary, and optional usage (tokens, tool calls, duration). spawn_subagent tool-call rows are suppressed so the UI shows agent tasks instead of bulky tool entries.
Parsing and mapping live in XAiAcpExtension; the mock ACP agent gains T3_ACP_EMIT_XAI_SUBAGENT for integration tests.
Reviewed by Cursor Bugbot for commit f3070ff. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Show Grok subagents as task events in the Agents panel
- Adds
emitGrokSubagentSessionUpdate in GrokAdapter.ts to convert xAI subagent_spawned/subagent_finished notifications into task.started and task.completed runtime events with taskId, role, model, usage, and summary.
- Suppresses
spawn_subagent tool call events from the normal tool-call stream by tracking their IDs in a new spawnSubagentToolIds set on the session context.
- Adds schemas, parsers, and helper utilities (
GROK_SUBAGENT_TASK_TYPE, grokSubagentCompletedStatus, grokSubagentResultSummary, isGrokSpawnSubagentToolTitle) in XAiAcpExtension.ts.
- Extends the mock agent script with a
T3_ACP_EMIT_XAI_SUBAGENT=1 flag to emit subagent lifecycle notifications for local testing.
Macroscope summarized f3070ff.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Newarr and petekblaz reacted with heart emoji
Grok already emits _x.ai/session/update spawn and finish events. T3 dropped them, so children only showed up as a huge spawn_subagent tool row.
Map those events to task.started and task.completed, the same fold Claude and Codex use. Hide the spawn tool so the roster is the only surface.
Made with Grok 4.6.
Important
Review skipped
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 450ad0ec-05f4-452b-9bab-97d380565f04
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment @coderabbitai help to get the list of available commands.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Thread transfer impact
✅ Thread transfer remains within every enforced ceiling.
ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.
| Provider |
Metric |
Main baseline |
This PR |
Impact |
PR ceiling |
|
| Codex |
Total thread wire |
— |
11.3 KiB |
— |
15.1 KiB |
✅ |
| Codex |
Thread snapshot wire |
— |
5.5 KiB |
— |
7.3 KiB |
✅ |
| Codex |
Live turn WebSocket wire |
— |
5.9 KiB |
— |
7.8 KiB |
✅ |
| Codex |
Live turn WebSocket decoded |
— |
49.7 KiB |
— |
66.4 KiB |
✅ |
| Codex |
Live turn messages |
— |
16 |
— |
21 |
✅ |
| Claude |
Total thread wire |
— |
11.3 KiB |
— |
15.1 KiB |
✅ |
| Claude |
Thread snapshot wire |
— |
5.5 KiB |
— |
7.3 KiB |
✅ |
| Claude |
Live turn WebSocket wire |
— |
5.9 KiB |
— |
7.8 KiB |
✅ |
| Claude |
Live turn WebSocket decoded |
— |
50.6 KiB |
— |
66.4 KiB |
✅ |
| Claude |
Live turn messages |
— |
16 |
— |
21 |
✅ |
Baseline: unavailable · PR result: f3070ff · Source CI: success
Scenario and decoded snapshot size
10 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.
- Codex decoded thread snapshot: 94.6 KiB
- Claude decoded thread snapshot: 95.4 KiB
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f3070ff. Configure here.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
...(toolUses !== undefined ? { toolUses } : {}),
|
|
|
...(durationMs !== undefined ? { durationMs } : {}),
|
|
|
}
|
|
|
: undefined;
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Zero tokens when usage partial
Low Severity
When subagent_finished includes duration_ms or tool_calls but omits tokens_used, typedUsage is still emitted with totalTokens forced to 0. The Agents panel can then show a misleading zero-token total even though token usage was simply absent.
Reviewed by Cursor Bugbot for commit f3070ff. Configure here.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Approvability
Verdict: Needs human review
This PR introduces a new feature with ~200+ lines of new event handling logic for Grok subagents, emitting new task.started/task.completed events to the runtime. New capabilities with non-trivial runtime behavior changes warrant human review.
You can customize Macroscope's approvability policy. Learn more.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Note 🤖 GPT-5.6 Sol responding on behalf of Theo
We're closing this PR as we clean up the T3 Code backlog. Thank you for taking the time to put this together.
This maps Grok subagent spawn and finish events into the Agents panel and adds a direct adapter fixture. #8412 is the retained Grok implementation and also covers standalone children, workflow and parent linkage, progress, deduplication, terminal-first updates, and typed usage.
If you believe we closed this in error, please reopen the PR and leave a comment explaining what we missed.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
size:L
100-499 changed lines (additions + deletions).
vouch:trusted
Author is trusted by repo permissions or the VOUCHED list.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|