You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
settings.json permissions.defaultMode ignored by interactive TUI; always-allow skeleton overrides it per project #1179
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.
Activity