[BUG] --settings argument is disreguarded
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When I run Claude code with the --settings argument, the provided settings are ignored. It's ignored whether it's a JSON string OR a path to a JSON file.
Example:
claude --settings=/tmp/gitbutler-claude-settings.json
/tmp/gitbutler-claude-settings.json
{"hooks":{"Stop":[{"hooks":[{"command":"osascript -e 'display notification \"Nailed it\" with title \"Claude Code\" subtitle \"AI assistant\" sound name \"Glass\"'","type":"command"}],"matcher":""}]}}
It seems like this regression was introduced in 1.0.94. The last working version we've found is 1.0.93.
The issue is prevalent when used with our streaming arguments in GitButler as well as passing --settings and using it through the TUI like in the provided example.
What Should Happen?
With this example hook, it should send a notification when claude has finished responding.
Error Messages/Logs
Steps to Reproduce
- Write
{"hooks":{"Stop":[{"hooks":[{"command":"osascript -e 'display notification \"Nailed it\" with title \"Claude Code\" subtitle \"AI assistant\" sound name \"Glass\"'","type":"command"}],"matcher":""}]}}into/tmp/gitbutler-claude-settings.json - Run
claude --settings=/tmp/gitbutler-claude-settings.json
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
1.0.93
Claude Code Version
1.0.109
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other
Additional Information
No response
Found 3 possible duplicate issues:
- https://github.com/anthropics/claude-code/issues/5933
- https://github.com/anthropics/claude-code/issues/6087
- https://github.com/anthropics/claude-code/issues/5140
This issue will be automatically closed as a duplicate in 3 days.
- If your issue is a duplicate, please close it and 👍 the existing issue instead
- To prevent auto-closure, add a comment or 👎 this comment
🤖 Generated with Claude Code
Issue 1. is talking about the merging behaviour (which is intended). This issue talks about --settings not working at all. 2. and 3. are different topics.
Update:
After a random last ditch effort before we started merging our config into the main user's config, I typed --settings XXX instead of --settings=XXX, it now works!
It seems like in 1.0.94 specifically the --settings argument stopped supporting having an = after it. The --mcp-config and --output-format and others all work just fine with an = except --settings now.
I can repro that = doesn't work for --settings specifically due to the way we parse the flag.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
I can repro that
=doesn't work for--settingsspecifically due to the way we parse the flag.
Commenting to keep the issue open. It was the cause of https://github.com/anthropics/claude-code/issues/13468
Any ETA on a fix for this very simple issue?