pingdotgg / pingdotgg/t3code

[Bug]: Claude provider turn fails with "turn/setPermissionMode failed" when permission mode is Auto

Open
#4,495 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug needs-triage
Dominant language
TypeScript
Stars
23k
Forks
5.9k
Avg merge
11h 14m
Merged PRs (30d)
357

Description

Before submitting
  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.
Area

apps/web

Steps to reproduce
  1. Open a project in T3 Code with Claude Sonnet 4.6 selected as the model
  2. Set the permission mode dropdown (next to the model selector) to "Auto"
  3. Send any prompt
  4. Turn fails immediately
  5. Retry sending in the same thread — fails again with the same error
Expected behavior

The turn should start normally and Claude should respond, the same way it does under "Full access" permission mode.

Actual behavior

The turn fails immediately with a "Provider turn start failed" banner reading "turn/setPermissionMode failed". This happens consistently and only when permission mode is set to "Auto" — switching to "Full access" or "Build" works fine on the same model/thread.

Impact

Major degradation or frequent failure

Version or commit

0.0.29-nightly.20260724.896 (Nightly channel)

Environment

Windows 11, Claude Sonnet 4.6 via Claude Code adapter (@anthropic-ai/claude-agent-sdk@0.3.170 per pnpm-lock.yaml), local claude CLI v2.1.146, authenticated via claude.ai OAuth (Pro plan).

Logs or stack traces
Error tag "turn/setPermissionMode" traces to apps/server/src/provider/Layers/ClaudeAdapter.ts, toRequestError(input.threadId, "turn/setPermissionMode", cause) around line ~3759-3765, likely triggered via the runtimeModeToPermission mapping at ~line 3510-3515 which passes SDK permissionMode: "auto". That value is present in the pinned SDK version's own type declarations (0.3.170), so this doesn't look like a simple type/version mismatch — possibly rejected by the spawned `claude` CLI binary itself over the control protocol. Have not pulled the local diagnostics trace file to confirm the exact underlying `cause`.
Screenshots, recordings, or supporting files

No response

Workaround

Switching permission mode to "Full access" or "Build" before sending resolves it immediately on the same thread/model.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in apps/server/src/provider/Layers/ClaudeAdapter.ts around the runtimeModeToPermission mapping at lines 3510-3515 and the turn/setPermissionMode error handling near lines 3759-3765. Reproduce with Claude Sonnet 4.6 and Auto permission mode, then inspect the local diagnostics trace to identify the underlying cause. Done means Auto starts a turn successfully while Full access and Build continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.