Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(grok): Supervised asks and Always allow works #6626

Closedmbrow190(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/6626/headopened View on GitHub

What 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.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit f9a312e12b497fdb9ec1e6629068c011e3840656. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

Note

Fix Grok supervised mode permission handling and 'Always allow' session behavior

  • Maps acceptForSession to allow_once in selectGrokPermissionOptionId when Grok omits the allow_always option, preventing a silent failure to select a permission option.
  • Adds a sessionAllowAll flag in makeGrokAdapter so subsequent permission requests are auto-approved after the user picks 'Always allow this session', even when allow_always is absent from Grok's options.
  • Propagates runtimeMode into the Grok ACP spawn args via grokAcpSpawnArgs, mapping approval-required → --permission-mode default and full-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-required mode now explicitly pass --permission-mode default to the CLI, overriding any always-approve setting in a user's local Grok config.
Macroscope summarized f9a312e.
    1. 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: 8b449beb-3d36-41c7-b925-a93da91a2af3

      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:

      • 🔍 Trigger review

      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.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    3. 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).
    4. Note

      🤖 GPT-5.6 Sol responding on behalf of Theo

      I am closing this because #8358 has landed in main and 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.

Sign in to join this conversation.