[BUG] Status line not refreshed after /new — the statusline command still receives stale session data (token counts, context usage, transcript path) from the previous conversation after running /new.
Resolved 💬 3 comments Opened Mar 1, 2026 by chenroth-island Closed Mar 5, 2026
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 create a new session /new (while working on a previous one), the status line doesn't reset the fields (cost, turns etc)
What Should Happen?
i expect the status line to be reset (0 cost, 0 turns, 0 ctx)
Error Messages/Logs
the statusline isn't reset when using /new
⏺ claude-code-guide(Statusline reset on /new)
⎿ Done (4 tool uses · 21.5k tokens · 8s)
(ctrl+o to expand)
⏺ Let me look at your statusline setup to understand the issue.
⏺ Searched for 1 pattern, read 2 files (ctrl+o to expand)
⏺ This is a Claude Code bug, not something in your script. Your statusline script is fully stateless — it reads the JSON payload from stdin each invocation and computes everything fresh. So when /new starts a new conversation but the
statusline still shows the old context %, turn count, and cost, it means Claude Code isn't sending updated/reset data to the statusline command after /new.
You can report this at https://github.com/anthropics/claude-code/issues — the gist is:
Status line not refreshed after /new — the statusline command still receives stale session data (token counts, context usage, transcript path) from the previous conversation after running /new.
As a workaround, you could add a check in your script for the transcript file's age or size to detect a fresh session, but that's a hack — the real fix needs to happen in Claude Code itself.
Steps to Reproduce
create a statusline containing cost, ctx, # of turns
start a new session after being in one (/new)
look at the statusline
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.63
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗