Skip to content

fix(claude): keep permissions.defaultMode on auto - #6

Merged
phall1 merged 1 commit into
mainfrom
fix/claude-default-mode-auto
Aug 17, 2026
Merged

fix(claude): keep permissions.defaultMode on auto#6
phall1 merged 1 commit into
mainfrom
fix/claude-default-mode-auto

Conversation

@phall1

@phall1 phall1 commented Aug 17, 2026

Copy link
Copy Markdown
Owner

The last standing dot-doctor warning, resolved in favour of auto.

dot_claude/modify_settings.json merges its managed block over whatever is on disk with managed winning (. * $managed), so it re-asserted permissions.defaultMode=bypassPermissions on every apply while the live file sat on auto. That is a disagreement about permission posture, not drift — chezmoi and the running tool each wanted a different answer, and chezmoi re-add cannot capture it because a modify_ script computes its output.

The script now asserts auto, so the two agree and the warning cannot recur.

skipDangerousModePermissionPrompt is left as-is: it suppresses the confirmation when bypass mode is entered deliberately and does not select the mode, so it is unaffected.

Verification

$ sh -n dot_claude/modify_settings.json                      # syntax OK
$ cat ~/.claude/settings.json | sh dot_claude/modify_settings.json | jq -r .permissions.defaultMode
auto
$ chezmoi diff ~/.claude/settings.json                       # empty — no drift
$ diff <(jq -S . ~/.claude/settings.json) <(cat ~/.claude/settings.json | sh dot_claude/modify_settings.json | jq -S .)
                                                             # identical — nothing else touched

herdr's SessionStart hook survives the merge, which is the property the script exists to protect.

Expected after merge: dot-doctorno warnings, no failures.

🤖 Generated with Claude Code

The modify_ script merges its managed block over whatever is on disk, managed
winning, so it re-asserted permissions.defaultMode=bypassPermissions on every
apply while the live file sat on auto. That was the last standing dot-doctor
drift warning, and it was a disagreement about permission posture rather than
drift: chezmoi and the running tool each wanted a different answer.

auto is the answer. The script now asserts it, so the two agree and the warning
cannot recur.

skipDangerousModePermissionPrompt is left as it was. It suppresses the
confirmation when bypass mode is entered deliberately and does not select the
mode, so it is unaffected by this change.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@phall1
phall1 enabled auto-merge (squash) August 17, 2026 14:34
@phall1
phall1 merged commit 4e81296 into main Aug 17, 2026
1 check passed
phall1 pushed a commit that referenced this pull request Aug 19, 2026
Reverses #6. Requested explicitly; full-autonomy mode is the intended
default for this workstation.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant