Skip to content

settings.json permissions.defaultMode ignored by interactive TUI; always-allow skeleton overrides it per project #1179

Backlog

Description

@jimbb

Version: 1.93.3 (Linux, Node 24)

1. permissions.defaultMode in settings.json is ignored by the interactive TUI

~/.commandcode/settings.json:

{ "permissions": { "defaultMode": "yolo" } }

("bypass" behaves the same.) Running plain cmd starts in default mode with no "permission bypass on" badge. cmd --yolo and cmd --permission-mode yolo both start in bypass.

Cause: resolveInitialPermissionMode only looks at --permission-mode / --plan, and usePermissionMode falls back to dangerouslySkipPermissions ? "bypass" : "default". The config value is only read by the harness store (getPermissionMode), and the TUI's own "default" overrides it when the session starts.

Fix that works for me (in the async interactive launch, right before buildInteractiveCLIProps): when no mode flag was given, set options.permissionMode = normalizePermissionMode((await loadCommandCodeConfig({runtime})).permissions?.defaultMode).

2. "Always allow" writes defaultMode: "default" into a new project settings file

addPermissionToSettings creates .commandcode/settings.json with the skeleton {allow:[],deny:[],defaultMode:"default"}. Because a project layer overrides the user layer, approving one command in a project silently turns off a user-level defaultMode there from then on. The skeleton should leave defaultMode out.

🤖 Generated with Claude Code

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions