Skip to content

Fix Claude Code Chats in Supervised Mode (rather than Full Access Mode)#1851

Open
tamaro-skaljic wants to merge 2 commits intopingdotgg:mainfrom
tamaro-skaljic:tamaro-skaljic/fix/1818
Open

Fix Claude Code Chats in Supervised Mode (rather than Full Access Mode)#1851
tamaro-skaljic wants to merge 2 commits intopingdotgg:mainfrom
tamaro-skaljic:tamaro-skaljic/fix/1818

Conversation

@tamaro-skaljic
Copy link
Copy Markdown

@tamaro-skaljic tamaro-skaljic commented Apr 9, 2026

What Changed

Fixes #1818

Why

When trying to use the Claude Code with Supervised rather than Full access mode, the chat rightaway fails with the error described in the issue.

The fix is to set the correct (default) permission mode when changing from Full access to Supervised.

Checklist

  • This PR is small and focused
  • I explained what changed and why

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 to permissionMode: "default" instead of leaving permissionMode unset.

ClaudeAdapter now always includes permissionMode in the SDK query options (still using bypassPermissions for full-access and acceptEdits for 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 sessions

Sessions started with runtimeMode: "approval-required" were not passing a permissionMode to the underlying query options, causing them to behave incorrectly. ClaudeAdapter.ts now maps "approval-required" to permissionMode: "default" and always includes permissionMode in query options for all runtime modes.

Macroscope summarized 7e65313.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 9, 2026

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: d89634ca-827f-41f3-98c2-1bcb58db86b2

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

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 and usage tips.

@github-actions github-actions bot added size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Apr 9, 2026
@tamaro-skaljic tamaro-skaljic changed the title (fix): Fix Claude Code Adapter for Supervised Chats Fix Claude Code Chats in Supervised Mode (rather than Full Access Mode) Apr 9, 2026
@Soif2Sang
Copy link
Copy Markdown

I've ran into the same issue and had a similar fix; I would like to mention that after switching from a full permission that fails to a supervised in the same chat fails because it says the conversation is not found
image

@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp bot commented Apr 9, 2026

Approvability

Verdict: 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.

@juliusmarminge juliusmarminge force-pushed the tamaro-skaljic/fix/1818 branch from 3b0dae3 to fd7dc09 Compare April 9, 2026 18:18
@github-actions github-actions bot added size:S 10-29 changed lines (additions + deletions). size:XS 0-9 changed lines (additions + deletions). and removed size:XS 0-9 changed lines (additions + deletions). size:S 10-29 changed lines (additions + deletions). labels Apr 9, 2026
tamaro-skaljic and others added 2 commits April 10, 2026 21:20
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
@tamaro-skaljic tamaro-skaljic force-pushed the tamaro-skaljic/fix/1818 branch from 99391f7 to 7e65313 Compare April 10, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: : Cannot set permission mode to bypassPermissions because the session was not launched with --dangerously-skip-permissions

4 participants