Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat: add "Auto" runtime mode — AI-reviewed approvals for Codex and Claude #4272

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 2 commits intomain fromrefs/pull/4272/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Summary

Adds a new "auto" runtime mode between Auto-accept edits and Full access. Both native backends recently shipped a model-reviewed approval mode that is strictly safer than full access — risky actions can still be denied or escalated, and (for Codex) the sandbox stays on:

  • Codex: keeps approvalPolicy: "on-request" + sandbox: workspace-write, and sets approvalsReviewer: "auto_review" on thread/start and turn/start — a reviewer subagent decides approval requests (sandbox escapes, network access, MCP prompts) instead of routing them to the user.
  • Claude: passes permissionMode: "auto" (no allowDangerouslySkipPermissions), where a classifier model approves/denies each permission prompt. Escalations still flow through canUseTool into the existing approval UI; classifier denials surface via the already-handled permission_denied → tool.denied event.
  • Other adapters (Cursor, Grok, OpenCode): fall through to their existing non-full-access behavior.

Changes

  • packages/contracts: add "auto" to RuntimeMode
  • apps/server: Codex + Claude adapter mappings
  • apps/web: mode picker entries (full + compact composer)
  • apps/mobile: runtime options in ThreadComposer and NewTaskDraftScreen
  • Tests for both adapters' wire params

Notes for reviewers

  • No DB migration needed: runtime_mode is a TEXT column with no CHECK constraint; mid-thread mode changes already restart the session via ProviderCommandReactor.
  • approvalsReviewer exists in the generated app-server schema (effect-codex-app-server), so no regeneration was needed. Requires a codex binary recent enough to know the field (verified in 0.145.0).
  • Older mobile clients pinned to the previous contract will fail to decode threads set to "auto" — same skew consideration as any enum addition.

🤖 Generated with Claude Code


Note

Medium Risk Changes approval routing and sandbox/permission semantics for agent sessions; incorrect mapping could weaken supervision or strand users on sticky reviewers after mode changes.

Overview Adds auto as a new RuntimeMode between auto-accept edits and full access, exposed in web, mobile, and compact composer pickers.

Codex maps auto to on-request approvals with workspace-write sandbox and sets approvalsReviewer: auto_review on every thread/turn start (including non-auto modes with explicit user) so mode switches do not leave the auto reviewer sticky on resume.

Claude maps auto to permissionMode: "auto" without allowDangerouslySkipPermissions.

Adapter tests cover the new wire params for both backends.

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

Note

Add 'Auto' runtime mode with AI-reviewed approvals for Codex and Claude

  • Adds 'auto' as a valid RuntimeMode in orchestration.ts, wiring it through the full stack: web/mobile UI menus, Claude adapter, and Codex session runtime.
  • In Claude, runtimeMode: 'auto' maps to permissionMode: 'auto' in outgoing query options via ClaudeAdapter.ts.
  • In Codex, 'auto' mode sets approvalsReviewer: 'auto_review', approvalPolicy: 'on-request', and uses the workspaceWrite sandbox policy via CodexSessionRuntime.ts.
  • All other runtime modes now explicitly set approvalsReviewer: 'user' in thread and turn start params.
Macroscope summarized 8c2ff69.
    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      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

      Run ID: 46401bd4-c7a4-4f37-95d0-8a591a77f040

      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
      ✨ Finishing Touches
      🧪 Generate unit tests (beta)
      • Create PR with unit tests
      • Commit unit tests in branch `t3code/plan-auto-approve-permissions`

      Comment `@coderabbitai help` to get the list of available commands.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    3. Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

      Fix All in Cursor ❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the [Cursor dashboard](https://www.cursor.com/dashboard/bugbot). Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit b742293602f79e49724ba82840571454c8af167b. Configure [here](https://www.cursor.com/dashboard/bugbot).
    4. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Needs human review

      This PR introduces a new user-facing feature ('Auto' runtime mode) that routes approval decisions to an AI reviewer instead of the user. New features with significant workflow changes warrant human review.

      You can customize Macroscope's approvability policy. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    5. t3dotgg(GitHub profile, opens in a new tab) added labelsneeds-julius

    6. The UI implies other providers support auto-review mode, which they do not, which can be confusing/deceptive to the user.

Sign in to join this conversation.