feat(grok): native ACP parity (catalog, effort, usage, plan, multi-agent, compact) - #5423
feat(grok): native ACP parity (catalog, effort, usage, plan, multi-agent, compact)#5423EnzoTironi wants to merge 4 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the 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. Comment |
ApprovabilityVerdict: Needs human review This feature PR introduces substantial new Grok provider capabilities including reasoning effort configuration, token usage tracking, Plan/Build mode mapping, multi-agent task visibility, compact commands, and slash command catalogs. The scope and complexity of these new runtime behaviors warrants human review. You can customize Macroscope's approvability policy. Learn more. |
|
Review findings from Bugbot/Macroscope for this slice are fixed on the Zoen product tip ( |
449b958 to
6c766ad
Compare
6c766ad to
8912a8f
Compare
- Skip set_model when effort matches currentEffort; no-op when model id missing - Session model context windows win over initializeMeta for the same modelId - Require encoded-cwd/session-id segments for Grok plan.md paths - Prefix /default when leaving plan mode for Build
There was a problem hiding this comment.
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 0792ff8. Configure here.
clearProposedPlanFallback only drops turn-scoped plan.md fallback. Clearing planModeActive there made every new sendTurn see plan mode as off, so Build never emitted /default after a Plan turn.
|
Man I just wanted grok to work normally with some QoL improvements, and you took that and turned it up to 11 |
I am still working on it. I am now making the stop button work properly. You can checkout to the PR and test it out. |
|
Oh yeah, i totally forgot about that, the thread still keeps going even if you interrupt it. There is also steer/queue prompts |





What Changed
Grok provider ACP parity (self-contained branch: shared parser commit + Grok adapter commit):
session/updatekinds → typed events;set_model_metapass-through (#5422 same commits)/compactalways presentsession/set_model_meta.reasoningEffort(no process restart)_meta+ usage_update → context meter; per-model windows; idempotent/plantext; Plan/Build toggle for Grokexit_plan_mode→ proposed-plan card + abandoned capture; sessionplan.mdonly under~/.grok/sessions/spawn_subagent→task.*with unique stamps + dedupe/compact+auto_compact_completed→ compacted work-log rowFixes #5417 #5418 #5419 #5420.
Merge note: Prefer merging #5422 first (shared parser only, size L), then this. If maintainers want one PR, this tip already contains both commits and can land alone.
Why
Grok Build already exposes these on the wire. T3 left them dark while Claude/Codex surface them. One adapter-boundary PR avoids unmergeable half-states from mid-file splits.
Related: #5403 #5405 #5409 #5412 #5131 — this tip absorbs those lakes with review fixes.
UI Changes
Uses existing Traits / meter / proposed-plan / task rows / Plan toggle — no new chrome.
Grok selected with effort menu
Plan mode toggle
Slash menu: /plan (built-in) + /compact (provider)
Checklist
Out of scope
Test plan
Model: grok-4.5 (Grok Build)
Note
High Risk
Large, central Grok provider/ACP adapter changes affect turn lifecycle, catalog merging, plan-mode prompt rewriting, and token usage—behavior users rely on in every Grok thread; regressions would be user-visible across sessions.
Overview
Brings Grok’s live ACP wire behavior into T3’s existing provider UI: context meter, Plan/Build, slash/skills, proposed-plan cards, task rows, and compaction work-log entries—without new chrome.
Shared ACP parsing now turns more
session/updatekinds into typed events (reasoning chunks, usage, available commands, config options, session info, user echoes) and passes optional_metathroughsession/set_model.Grok provider snapshot enables Plan/Build and in-thread model changes (
requiresNewThreadForModelChange→ false), discovers models with Reasoning option descriptors from_meta, merges live slash/skills from initialize andavailable_commands_update(empty catalog clears stale entries), always keeps static/compact, and improves probe auth messaging.Grok driver publishes catalog changes immediately via PubSub so clients do not wait on the next health probe.
Grok adapter maps those events to runtime semantics: token usage from prompt
_metaandusage_update; thread titles fromsession_info_update;/compact/auto_compact_completed→thread.state.changedcompacted;exit_plan_modeand sessionplan.mdwrites →turn.proposed.completedwith abandoned capture so turns do not hang;spawn_subagent→task.*with dedupe; plan mode via/planand/defaultprompt prefixes; mid-thread reasoning effort viasession/set_model_meta.reasoningEffort(CLI flags only on spawn); optionalonAvailableCommandscallback for the driver.Mock agent and tests are extended to simulate initialize commands, usage meta, compaction, session info, skills-reload response ids, and effort
set_modelwithout process restart.Reviewed by Cursor Bugbot for commit 29e5c6b. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add native ACP parity to Grok provider including catalog, reasoning effort, token usage, plan mode, multi-agent, and compact support
thread.token-usage.updatedfrom both prompt RPC meta andsession/updateUsageUpdated events, including per-model context window tracking./planor/defaultbased oninteractionMode,enter_plan_modetool calls toggle plan state, andturn.proposed.completedevents are emitted from plan.md writes andexit_plan_mode.task.started/task.completedevents;/compactprompts triggerthread.state.changedviaauto_compact_completedsession notifications.availableCommandsin the ACP init result, with/compactalways present as a static fallback viaensureGrokStaticSlashCommands.session/set_model_meta.reasoningEffort(orsession/set_config_optionwhen exposed as a config option), and models now surface a Reasoning select in capabilities when advertised.session_info_updatenotifications map tothread.metadata.updated;agent_thought_chunkmaps toContentDeltawithstreamKind: 'reasoning_text'.commandCatalogChanges, not only on health probes or setting changes.Macroscope summarized 29e5c6b.