claude-code - 💡(How to fix) Fix StatusLine JSON input missing session effort level [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#51983Fetched 2026-04-23 07:39:41
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
labeled ×3cross-referenced ×1

The statusline JSON input (passed to custom statusLine.command on stdin) does not include the current session effort level. This makes it impossible for statusline scripts to reflect effort changes made via the /effort command.

Root Cause

The statusline JSON input (passed to custom statusLine.command on stdin) does not include the current session effort level. This makes it impossible for statusline scripts to reflect effort changes made via the /effort command.

Fix Action

Workaround

Currently the only option is reading the persisted effortLevel from ~/.claude/settings.json, which misses session-only overrides set via /effort.

Code Example

session_id, transcript_path, cwd, model, workspace, version,
output_style, cost, context_window, exceeds_200k_tokens, rate_limits

---

{
  "effort_level": "xhigh",
  ...
}
RAW_BUFFERClick to expand / collapse

Summary

The statusline JSON input (passed to custom statusLine.command on stdin) does not include the current session effort level. This makes it impossible for statusline scripts to reflect effort changes made via the /effort command.

Current behavior

The statusline JSON contains these top-level keys:

session_id, transcript_path, cwd, model, workspace, version,
output_style, cost, context_window, exceeds_200k_tokens, rate_limits

When a user runs /effort max (or any /effort level), no field in this JSON changes. The output_style.name field remains "default" regardless of effort level.

Expected behavior

The statusline JSON should include the current session effort level, e.g.:

{
  "effort_level": "xhigh",
  ...
}

This would allow custom statusline scripts to display the active effort level and react to session-level changes made via /effort.

Workaround

Currently the only option is reading the persisted effortLevel from ~/.claude/settings.json, which misses session-only overrides set via /effort.

Environment

  • Claude Code version: 2.1.117
  • Model: claude-opus-4-6[1m]
  • Platform: macOS (Darwin 25.4.0)

extent analysis

TL;DR

Update the statusLine.command to include the current session effort level in the statusline JSON input.

Guidance

  • Verify that the effortLevel is being updated correctly in the ~/.claude/settings.json file when the /effort command is run.
  • Check if there is an existing API or function that can retrieve the current session effort level, which can be used to update the statusline JSON.
  • Consider modifying the statusLine.command to read the effortLevel from the ~/.claude/settings.json file as a temporary workaround, despite its limitations.
  • Investigate if there are any existing issues or pull requests related to this feature that may provide more insight or a potential solution.

Example

No code example is provided as it would require more information about the statusLine.command and the API/functions available.

Notes

The current workaround has limitations, as it does not account for session-only overrides set via the /effort command. A more robust solution would involve updating the statusline JSON to include the current session effort level.

Recommendation

Apply workaround: Modify the statusLine.command to read the effortLevel from the ~/.claude/settings.json file, despite its limitations, until a more robust solution is available.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

The statusline JSON should include the current session effort level, e.g.:

{
  "effort_level": "xhigh",
  ...
}

This would allow custom statusline scripts to display the active effort level and react to session-level changes made via /effort.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING