# feat\(grok\): capture exit_plan_mode into the v2 proposed-plan card \(\#8358\) · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/commit/c9b897165769fb576ec0d50f70d703de4f0381be)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

Requested revision: c9b897165769fb576ec0d50f70d703de4f0381be

Requested commit: c9b897165769fb576ec0d50f70d703de4f0381be

Commit: c9b897165769fb576ec0d50f70d703de4f0381be

Tree: 43afa4f802a0c3fa367688b8c987999377e8125a

Author: Julius Marminge

Committer: Julius Marminge

## Message

```
feat(grok): capture exit_plan_mode into the v2 proposed-plan card (#8358)

Completes the deferred half of #8358: Grok's plan-approval gate now works
on the v2 runtime. The XAi extension regains main's exit-plan helpers
(request schemas, plan-markdown extraction, the abandoned-with-feedback
response, and the plan.md session-path sniffing), and the v2 ACP adapter
grows a captureProposedPlan primitive that emits a completed
proposed-plan artifact for the active turn — one plan id per turn, so
plan.md rewrites and the exit gate update a single card.

The Grok flavor wires both ends: tool calls that write plan.md under a
Grok session dir surface the plan while plan mode is still active, and
x.ai/exit_plan_mode (plus the underscore alias) captures the final plan —
request content first, then the sniffed plan.md contents, then the
empty-state placeholder — and abandons the native gate so the turn does
not hang, mirroring the Claude ExitPlanMode pattern.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

```

## Parents

- [6bfd5b19e677fb18cd0be6b860cf035d24053f43](https://git.cafe/pingdotgg/t3code/commit/6bfd5b19e677fb18cd0be6b860cf035d24053f43?format=markdown)

[Source at this commit](https://git.cafe/pingdotgg/t3code/tree/c9b897165769fb576ec0d50f70d703de4f0381be?format=markdown)
