[BUG] New --settings flag not working

Status Fixed / completed
Maintainer reply ✓ Yes — dicksontsai
Activity 11 comments · opened Jul 26, 2025 · closed Jul 31, 2025
💡 Likely answer: A maintainer (dicksontsai, collaborator) responded on this thread — see the highlighted reply below.

Environment

  • Platform (select one): Max plan
  • Claude CLI version: 61
  • Operating System: linux
  • Terminal: alacritty

Bug Description

New --settings flag doesn't appear to work

Steps to Reproduce

┌─╼[130]╾─╼[09:39:54]
└─╼[~/code/dotfiles]
 ╰╼[main]╾─╼[4d99149]
▶ cat /tmp/settings.json
{
  "model": "opus",
  "permissions": {
    "defaultMode": "plan"
  }
}

┌─╼[09:39:55]
└─╼[~/code/dotfiles]
 ╰╼[main]╾─╼[4d99149]
▶ claude /model
╭───────────────────────────────────────────────────╮
│ ✻ Welcome to Claude Code!                         │
│                                                   │
│   /help for help, /status for your current setup  │
│                                                   │
│   cwd: /home/mike/code/dotfiles                   │
╰───────────────────────────────────────────────────╯
╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                                                                                                                                                                     │
│  Select Model                                                                                                                                                                                                                       │
│  Switch between Claude models. Applies to this session and future Claude Code sessions. For custom model names, specify with --model.                                                                                               │
│                                                                                                                                                                                                                                     │
│   ❯ 1. Default (recommended)  Opus 4 for up to 50% of usage limits, then use Sonnet 4✔                                                                                                                                              │
│     2. Opus                   Opus 4 for complex tasks · Reaches usage limits faster                                                                                                                                                │
│     3. Sonnet                 Sonnet 4 for daily use                                                                                                                                                                                │
│                                                                                                                                                                                                                                     │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
 Enter to confirm · Esc to exit
┌─╼[09:40:24]
└─╼[~/code/dotfiles]
 ╰╼[main]╾─╼[4d99149]
▶ claude
╭───────────────────────────────────────────────────╮
│ ✻ Welcome to Claude Code!                         │
│                                                   │
│   /help for help, /status for your current setup  │
│                                                   │
│   cwd: /home/mike/code/dotfiles                   │
╰───────────────────────────────────────────────────╯

╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ > Try "create a util logging.py that..."                                                                                                                                                                                            │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
  ? for shortcuts

Expected Behavior

Above I expect the model to be opus and the default mode to be plan mode

Actual Behavior

Neither setting is respected

Additional Context

I tried adding some hooks also but they didn't show up

View original on GitHub ↗

11 Comments

possibilities · 1 year ago

I see the custom path in debug messages:

[DEBUG] Watching for changes in setting files /home/mike/.claude/settings.json, /home/mike/code/dotfiles/.claude/settings.json, /home/mike/code/dotfiles/.claude/settings.local.json, /tmp/settings.json, /etc/claude-code/managed-sett
ings.json...

Also I checked and _only /tmp/settings.json exists out of those options.

dicksontsai collaborator · 1 year ago

Where do you specify --settings? I see claude /model but not claude --settings /tmp/settings.json /model

possibilities · 1 year ago

I screwed up. Apologies. Now that I look and do things correctly I see:

  • model key works
  • permissions does not work
  • hooks does not work

But since it's a new feature and not documented yet I have no good reason that's not the expected behavior. Is it?

possibilities · 1 year ago

Looks good:

┌─╼[mike@fatbird]╾─╼[19:24:30]
└─╼[~/code/browser-composer]
 ╰╼[main]╾─╼[2932183]
▶ cat /tmp/settings.json | jq .model
"opus"

┌─╼[mike@fatbird]╾─╼[19:24:36]
└─╼[~/code/browser-composer]
 ╰╼[main]╾─╼[2932183]
▶ claude --settings /tmp/settings.json --debug /model
[DEBUG] Writing to temp file: /home/mike/.claude.json.tmp.1909846.1753572286038
[DEBUG] Preserving file permissions: 100644
[DEBUG] Temp file written successfully, size: 600035 bytes
[DEBUG] Applied original permissions to temp file
[DEBUG] Renaming /home/mike/.claude.json.tmp.1909846.1753572286038 to /home/mike/.claude.json
[DEBUG] File /home/mike/.claude.json written atomically
[DEBUG] Creating shell snapshot for zsh (/usr/bin/zsh)
[DEBUG] Creating snapshot at: /home/mike/.claude/shell-snapshots/snapshot-zsh-1753572286131-zfqvxw.sh
[DEBUG] Writing to temp file: /home/mike/.claude/todos/a8187f75-4f0a-4fb3-ba8c-1e0b400036f9-agent-a8187f75-4f0a-4fb3-ba8c-1e0b400036f9.json.tmp.1909846.1753572286136
[DEBUG] Temp file written successfully, size: 2 bytes
[DEBUG] Renaming /home/mike/.claude/todos/a8187f75-4f0a-4fb3-ba8c-1e0b400036f9-agent-a8187f75-4f0a-4fb3-ba8c-1e0b400036f9.json.tmp.1909846.1753572286136 to /home/mike/.claude/todos/a8187f75-4f0a-4fb3-ba8c-1e0b400036f9-agent-a8187f75-4f0a-4fb3-ba8c-1e0b400036f9.json
[DEBUG] File /home/mike/.claude/todos/a8187f75-4f0a-4fb3-ba8c-1e0b400036f9-agent-a8187f75-4f0a-4fb3-ba8c-1e0b400036f9.json written atomically
[DEBUG] Writing to temp file: /home/mike/.claude.json.tmp.1909846.1753572286153
[DEBUG] Preserving file permissions: 100644
[DEBUG] Temp file written successfully, size: 599684 bytes
[DEBUG] Applied original permissions to temp file
[DEBUG] Renaming /home/mike/.claude.json.tmp.1909846.1753572286153 to /home/mike/.claude.json
[DEBUG] File /home/mike/.claude.json written atomically
[DEBUG] Writing to temp file: /home/mike/.claude.json.tmp.1909846.1753572286279
[DEBUG] Preserving file permissions: 100644
[DEBUG] Temp file written successfully, size: 599684 bytes
[DEBUG] Applied original permissions to temp file
[DEBUG] Renaming /home/mike/.claude.json.tmp.1909846.1753572286279 to /home/mike/.claude.json
[DEBUG] File /home/mike/.claude.json written atomically
╭───────────────────────────────────────────────────╮
│ ✻ Welcome to Claude Code!                         │
│                                                   │
│   /help for help, /status for your current setup  │
│                                                   │
│   cwd: /home/mike/code/browser-composer           │
╰───────────────────────────────────────────────────╯

 ※ Tip: Create custom slash commands by adding .md files to .claude/commands/ in your project or ~/.claude/commands/ for commands that work in any project
[DEBUG] Writing to temp file: /home/mike/.claude.json.tmp.1909846.1753572286342
[DEBUG] Preserving file permissions: 100644
[DEBUG] Temp file written successfully, size: 599684 bytes
[DEBUG] Applied original permissions to temp file
[DEBUG] Renaming /home/mike/.claude.json.tmp.1909846.1753572286342 to /home/mike/.claude.json
[DEBUG] File /home/mike/.claude.json written atomically
[DEBUG] Watching for changes in setting files /home/mike/.claude/settings.json, /home/mike/code/browser-composer/.claude/settings.json, /home/mike/code/browser-composer/.claude/settings.local.json, /tmp/settings.json, /etc/claude-code/managed-settings.json...
[DEBUG] AutoUpdaterWrapper: Installation type: npm-local, using native: false
[DEBUG] Shell snapshot created successfully (176614 bytes)
╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                                                                                                                                                                                                                                                           │
│  Select Model                                                                                                                                                                                                                                                                                                             │
│  Switch between Claude models. Applies to this session and future Claude Code sessions. For custom model names, specify with --model.                                                                                                                                                                                     │
│                                                                                                                                                                                                                                                                                                                           │
│     1. Default (recommended)  Opus 4 for up to 50% of usage limits, then use Sonnet 4                                                                                                                                                                                                                                     │
│   ❯ 2. Opus                   Opus 4 for complex tasks · Reaches usage limits faster✔                                                                                                                                                                                                                                     │
│     3. Sonnet                 Sonnet 4 for daily use                                                                                                                                                                                                                                                                      │
│                                                                                                                                                                                                                                                                                                                           │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
 Enter to confirm · Esc to exit
dicksontsai collaborator · 1 year ago
hooks does not work and permissions does not work

They should work. What do you have in your separate settings file for those fields?

possibilities · 1 year ago

Possibly this is expected behavior but it would be nice if we can put anything that goes in a settings file normally and have it picked up.

▶ cat /tmp/settings.json | jq '.hooks | keys'
[
  "Notification",
  "PostToolUse",
  "PreCompact",
  "PreToolUse",
  "Stop",
  "SubagentStop",
  "UserPromptSubmit"
]

┌─╼[mike@fatbird]╾─╼[19:25:45]
└─╼[~/code/browser-composer]
 ╰╼[main]╾─╼[2932183]
▶ claude --settings /tmp/settings.json --debug /hooks
[DEBUG] Writing to temp file: /home/mike/.claude.json.tmp.1913459.1753572356473
[DEBUG] Preserving file permissions: 100644
[DEBUG] Temp file written successfully, size: 600036 bytes
[DEBUG] Applied original permissions to temp file
[DEBUG] Renaming /home/mike/.claude.json.tmp.1913459.1753572356473 to /home/mike/.claude.json
[DEBUG] File /home/mike/.claude.json written atomically
[DEBUG] Creating shell snapshot for zsh (/usr/bin/zsh)
[DEBUG] Creating snapshot at: /home/mike/.claude/shell-snapshots/snapshot-zsh-1753572356560-p9r3xn.sh
[DEBUG] Writing to temp file: /home/mike/.claude/todos/069cb18e-ee92-4eec-9d37-38c5b66cabeb-agent-069cb18e-ee92-4eec-9d37-38c5b66cabeb.json.tmp.1913459.1753572356566
[DEBUG] Temp file written successfully, size: 2 bytes
[DEBUG] Renaming /home/mike/.claude/todos/069cb18e-ee92-4eec-9d37-38c5b66cabeb-agent-069cb18e-ee92-4eec-9d37-38c5b66cabeb.json.tmp.1913459.1753572356566 to /home/mike/.claude/todos/069cb18e-ee92-4eec-9d37-38c5b66cabeb-agent-069cb18e-ee92-4eec-9d37-38c5b66cabeb.json
[DEBUG] File /home/mike/.claude/todos/069cb18e-ee92-4eec-9d37-38c5b66cabeb-agent-069cb18e-ee92-4eec-9d37-38c5b66cabeb.json written atomically
[DEBUG] Writing to temp file: /home/mike/.claude.json.tmp.1913459.1753572356582
[DEBUG] Preserving file permissions: 100644
[DEBUG] Temp file written successfully, size: 599684 bytes
[DEBUG] Applied original permissions to temp file
[DEBUG] Renaming /home/mike/.claude.json.tmp.1913459.1753572356582 to /home/mike/.claude.json
[DEBUG] File /home/mike/.claude.json written atomically
[DEBUG] Writing to temp file: /home/mike/.claude.json.tmp.1913459.1753572356705
[DEBUG] Preserving file permissions: 100644
[DEBUG] Temp file written successfully, size: 599684 bytes
[DEBUG] Applied original permissions to temp file
[DEBUG] Renaming /home/mike/.claude.json.tmp.1913459.1753572356705 to /home/mike/.claude.json
[DEBUG] File /home/mike/.claude.json written atomically
╭───────────────────────────────────────────────────╮
│ ✻ Welcome to Claude Code!                         │
│                                                   │
│   /help for help, /status for your current setup  │
│                                                   │
│   cwd: /home/mike/code/browser-composer           │
╰───────────────────────────────────────────────────╯
[DEBUG] Watching for changes in setting files /home/mike/.claude/settings.json, /home/mike/code/browser-composer/.claude/settings.json, /home/mike/code/browser-composer/.claude/settings.local.json, /tmp/settings.json, /etc/claude-code/managed-settings.json...
[DEBUG] AutoUpdaterWrapper: Installation type: npm-local, using native: false
[DEBUG] Shell snapshot created successfully (176614 bytes)
╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Notification                                                                                                                                                                                                                                                                                                              │
│                                                                                                                                                                                                                                                                                                                           │
│ ❯ 1. + Add new hook…  No hooks configured yet                                                                                                                                                                                                                                                                             │
│                                                                                                                                                                                                                                                                                                                           │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
   Enter to select · Esc to go back
possibilities · 1 year ago
They should work. What do you have in your separate settings file for those fields?

Nothing:

▶ ls -lsa /home/mike/.claude/settings.json /home/mike/code/browser-composer/.claude/settings.json /home/mike/code/browser-composer/.claude/settings.local.json /tmp/settings.json /etc/claude-code/managed-settings.json
ls: cannot access '/home/mike/.claude/settings.json': No such file or directory
ls: cannot access '/home/mike/code/browser-composer/.claude/settings.json': No such file or directory
ls: cannot access '/home/mike/code/browser-composer/.claude/settings.local.json': No such file or directory
ls: cannot access '/etc/claude-code/managed-settings.json': No such file or directory
4 -rw-r--r-- 1 mike mike 2521 Jul 26 19:24 /tmp/settings.json
dicksontsai collaborator · 1 year ago

Ok, I see the issue. Since the flag settings are read-only, they do not appear in the UIs. The "bug" here is the inability to display read-only settings. This may take a couple of releases to address.

Separately for hooks, there is a loading issue that needs to be resolved. I'll address this by the next release.

dicksontsai collaborator · 1 year ago

Hooks + --settings is now fixed as of v1.0.62.

possibilities · 1 year ago

Appreciated!

On Mon, Jul 28, 2025, 9:52 PM Dickson Tsai @.***> wrote:

dicksontsai left a comment (anthropics/claude-code#4495) <https://github.com/anthropics/claude-code/issues/4495#issuecomment-3130302335> Hooks + --settings is now fixed as of v1.0.62. — Reply to this email directly, view it on GitHub <https://github.com/anthropics/claude-code/issues/4495#issuecomment-3130302335>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAD2X6PGP6TFEVVHBN6ONYL3K3HUNAVCNFSM6AAAAACCNTAOO6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTCMZQGMYDEMZTGU> . You are receiving this because you authored the thread.Message ID: @.***>
github-actions[bot] · 1 year ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.