Fix Claude Code Chats in Supervised Mode (rather than Full Access Mode)#1851
Fix Claude Code Chats in Supervised Mode (rather than Full Access Mode)#1851tamaro-skaljic wants to merge 2 commits intopingdotgg:mainfrom
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 Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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: Approved A clear bug fix that adds a missing mapping for the 'approval-required' runtime mode to the 'default' permission mode. The change is small, well-typed, and accompanied by a test update confirming the intended behavior. You can customize Macroscope's approvability policy. Learn more. |
3b0dae3 to
fd7dc09
Compare
Co-authored-by: codex <codex@users.noreply.github.com>
- Map runtime modes to permission modes with an explicit lookup - Include approval-required as the default permission path
99391f7 to
7e65313
Compare

What Changed
Fixes #1818
Why
When trying to use the Claude Code with
Supervisedrather thanFull accessmode, the chat rightaway fails with the error described in the issue.The fix is to set the correct (
default) permission mode when changing fromFull accesstoSupervised.Checklist
Note
Medium Risk
Changes how Claude SDK sessions are started by always sending an explicit
permissionMode, which affects tool/file access behavior across runtime modes. Risk is moderate because incorrect mapping could unintentionally over- or under-restrict permissions at runtime.Overview
Fixes supervised (
runtimeMode: "approval-required") Claude sessions by mapping them topermissionMode: "default"instead of leavingpermissionModeunset.ClaudeAdapternow always includespermissionModein the SDK query options (still usingbypassPermissionsfor full-access andacceptEditsfor auto-accept), and tests are updated to assert the new supervised-mode behavior.Reviewed by Cursor Bugbot for commit 7e65313. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Fix Claude Code chats in supervised mode by passing
permissionMode: "default"for approval-required sessionsSessions started with
runtimeMode: "approval-required"were not passing apermissionModeto the underlying query options, causing them to behave incorrectly. ClaudeAdapter.ts now maps"approval-required"topermissionMode: "default"and always includespermissionModein query options for all runtime modes.Macroscope summarized 7e65313.