fix(grok): Supervised asks and Always allow works #6626
main fromrefs/pull/6626/head·opened View on GitHubWhat Changed#
Grok Supervised now asks before commands, even when the local Grok CLI is set to always-approve. Always allow this session no longer cancels the turn. The next command in that thread does not ask again.
T3 starts Supervised Grok with --permission-mode default so the thread mode wins over ~/.grok/config.toml. Full access still starts Grok with --always-approve. If Grok omits ACP allow_always, Always allow falls back to allow_once and remembers the choice for the rest of the session.
This matches Codex and OpenCode. The composer control is the contract for the thread. Local always-approve stays for the Grok TUI.
Why#
Clicking Always allow on Grok 4.6 stopped the turn. Grok often only offers allow-once. T3 mapped a missing allow_always to cancelled.
A second hole sat in front of that. Users with [ui] permission_mode = "always-approve" never saw the bar. Supervised was a label only. Grok ran bash with no session/request_permission.
UI Changes#
No new chrome. The existing approval bar now appears on Supervised Grok threads.
Verified in T3 Code (Dev) on macOS against a live Grok 4.6 CLI with always-approve still in config.toml. New Supervised thread asked. Always allow continued the turn. The follow-up command did not ask again. Nightly was left unchanged.
Checklist#
- This PR is small and focused
- I explained what changed and why
- I included before/after screenshots for any UI changes
- I included a video for animation/interaction changes (not applicable)
Fixes #6502
Implemented with Grok 4.6 through T3 Code.
Note
Medium Risk Changes Grok spawn flags and permission decision mapping (approval/security path), but scope is limited to the Grok adapter with targeted tests and no broad auth refactor.
Overview Fixes Grok Supervised and Always allow this session so they match other providers and Grok 4.6 behavior.
Supervised / Full access: Spawning Grok now passes T3 runtimeMode into CLI args (--permission-mode default for Supervised, --always-approve for Full access, plus mappings for auto modes), so thread mode wins over local ~/.grok always-approve settings.
Always allow: When the user chooses session-wide approval but ACP only offers allow_once (common on Grok 4.6), the adapter selects allow_once instead of cancelling the turn, sets sessionAllowAll, and auto-approves later permission prompts for that session (same path as full-access).
The ACP mock agent gains env toggles to omit allow_always and emit multiple permission requests; unit and integration tests cover option selection and end-to-end flow. User docs note Grok permission-mode mapping.
Note
Fix Grok supervised mode permission handling and 'Always allow' session behavior#
- Maps
acceptForSessiontoallow_onceinselectGrokPermissionOptionIdwhen Grok omits theallow_alwaysoption, preventing a silent failure to select a permission option. - Adds a
sessionAllowAllflag inmakeGrokAdapterso subsequent permission requests are auto-approved after the user picks 'Always allow this session', even whenallow_alwaysis absent from Grok's options. - Propagates
runtimeModeinto the Grok ACP spawn args viagrokAcpSpawnArgs, mappingapproval-required→--permission-mode defaultandfull-access→--always-approve, so supervised sessions always prompt even if Grok CLI config says always-approve. - Updates permission-modes.md to document Grok's behavior under Supervised and Full access modes.
- Behavioral Change: Grok sessions in
approval-requiredmode now explicitly pass--permission-mode defaultto the CLI, overriding any always-approve setting in a user's local Grok config.
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
Approvability#
Verdict: Needs human review
This PR introduces runtime behavior changes to permission handling: a new sessionAllowAll flag for auto-approving subsequent requests, fallback logic when allow_always is unavailable, and forced CLI permission mode args. These changes affect how the approval system works and warrant human review.
You can customize Macroscope's approvability policy. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).Note
🤖 GPT-5.6 Sol responding on behalf of Theo
I am closing this because #8358 has landed in
mainand covers the same Grok permission modes and session approvals. I checked the current implementation and did not find any remaining change from this PR that we still need to merge.Thank you for putting this together. The closure is only because the work is now covered elsewhere, not because there was a problem with your contribution.
t3dotgg(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID:
8b449beb-3d36-41c7-b925-a93da91a2af3You can disable this status message by setting the
reviews.review_statustofalsein 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