Skip to content

[Bug]: Claude fails in restrictive environments #1241

Description

@mholttech

Before submitting

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

Area

apps/desktop

Steps to reproduce

  1. Open the Claude Code managed settings file for your OS: macOS /Library/Application Support/ClaudeCode/managed-settings.json, Linux/WSL /etc/claude-code/managed-settings.json, or Windows C:\Program Files\ClaudeCode\managed-settings.json. These are the official file-based managed settings locations. ([Claude]1)

  2. If the file does not exist, create it.

  3. Add this JSON:

{
  "permissions": {
    "disableBypassPermissionsMode": "disable"
  }
}
  1. Save the file.

  2. Restart Claude Code so it reloads managed settings.

  3. Verify the managed settings are active by running /status inside Claude Code. The docs say /status shows active configuration layers and their origin, including enterprise managed settings from a file. ([Claude]1)

  4. Open t3code and try to start a session and send hello.

  5. Expected result: bypass mode is blocked, because the permissions docs say administrators can prevent bypassPermissions by setting disableBypassPermissionsMode to "disable" in managed settings. ([Claude]2)

Expected behavior

t3code works without requiring bypass permissions in restricted environments.

Actual behavior

t3code does not work in restricted environments

Impact

Major degradation or frequent failure

Version or commit

main@77716b4ccb529b635730e30a4ca94f5affe9db24

Environment

MacOS 15.7.4

Logs or stack traces

Provider turn start failed - Error: Provider adapter request failed (claudeAgent) for turn/setPermissionMode: Cannot set permission mode to bypassPermissions because it is disabled by settings or configuration at toRequestError$1 (file:///Users/mwholt/GIT/github/pingdotgg/t3code/apps/server/dist/index.mjs:10773:9) at catch (file:///Users/mwholt/GIT/github/pingdotgg/t3code/apps/server/dist/index.mjs:12125:23) at file:///Users/mwholt/GIT/github/pingdotgg/t3code/node_modules/.bun/effect@https+++pkg.pr.new+Effect-TS+effect-smol+effect@8881a9b/node_modules/effect/dist/internal/effect.js:685:103 { [cause]: Error: Cannot set permission mode to bypassPermissions because it is disabled by settings or configuration at Object.handler (file:///Users/mwholt/GIT/github/pingdotgg/t3code/node_modules/.bun/@anthropic-ai+claude-agent-sdk@0.2.77+3c5d820c62823f0b/node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs:21:3891) at g9.readMessages (file:///Users/mwholt/GIT/github/pingdotgg/t3code/node_modules/.bun/@anthropic-ai+claude-agent-sdk@0.2.77+3c5d820c62823f0b/node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs:19:13019) at process.processTicksAndRejections (node:internal/process/task_queues:103:5) }

Screenshots, recordings, or supporting files

image.png

Workaround

None

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken or behaving incorrectly.needs-triageIssue needs maintainer review and initial categorization.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions