[BUG] `effort` is not displayable from the CLI status line script
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?
I have a shell script that I use to display the status line. I display the model and the effort. The effort is not reported through the statusline JSON on stdin, so my script (and - I've noticed - others) will look instead on ~/.claude/settings.json to extract the current configured effort.
However, in my isolated environments I use the CLAUDE_CONFIG_DIR variable to point my configuration elsewhere. So I have updated the statusline to use CLAUDE_CONFIG_DIR if it is set, in favour of the ~/.claude directory. But still I get no effort, displayed, because CLAUDE_CONFIG_DIR isn't passed down to the statusline script.
If the effort was passed through the JSON, then this would avoid the need for CLAUDE_CONFIG_DIR to be involved. It also would avoid the script having to fall back through to the /etc/claude-code/managed-settings.json (and strictly it should be searching everything listed in https://code.claude.com/docs/en/settings under configuration scopes.
What Should Happen?
There should be a way to retrieve the effort value, either through CLAUDE_CONFIG_DIR being available, or the value being passed through to the invoked command.
Error Messages/Logs
Steps to Reproduce
To reproduce the problem.
- Create a statusline.sh script which simply does
jq -r .effortLevel ${CLAUDE_CONFIG_DIR:-$HOME/.claude}/settings.json - Configure claude CLI in your settings with:
"statusLine": {
"type": "command",
"command": ".../statusline.sh"
},
- Open claude and see that the effort is populated.
- Use /effort to change, and observe that it changes.
- Exit and use
export CLAUDE_CONFIG_DIRto select a new configuration directory. mkdir "$CLAUDE_CONFIG_DIR"cp ~/.claude/settings.json "$CLAUDE_CONFIG_DIR/settings.json"- Start claude.
- Observe that whatever you do with /effort, it's still showing the value from
~/.claude/settings.json(because that's all we know how to read.
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.116 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗