Repository navigation
[skip-cr] feat: repo-wide session counts on line 1 - #13
Merged
Merged
Conversation
Count every live Claude Code session in the same repo (this one included) from the session registry and show them right-aligned on line 1: busy, background shells, waiting on you (?), and idle. Hidden when the session is alone in its repo; STATUSLINE_PEERS=0 opts out. Codex shim entries are excluded. The ? state is a transcript-tail hint. Docs pending.
Review fixes: parse registry files one by one so a malformed file cannot hide the rest; reject pid 0; resolve a symlinked cwd before the worktree match; treat an answered or cancelled question prompt as settled; read every idle peer's transcript tail in one batched jq pass. The count the current session belongs to is now bracketed in any state.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds repo-wide session counts to the right edge of line 1 (
STATUSLINE_PEERS, on by default). When another Claude Code session works in the same repository, every statusline in that repo shows the same picture, by state:⚙Nbusy (a turn or background subagent is running)◷Nthe turn ended but background shells are still running?Nidle, and its last reply asked you something (reverse video)○Nidle, asked nothingZero counts are omitted, a lone session renders as before, and the count the current session belongs to is bracketed (
[⚙2] ?1 ○1). Codex peer threads are not counted.How
~/.claude/sessions/*.json): live pid,.status,.cwdinside agit worktree listpath (symlinked cwd resolved on a miss). Registry files are parsed one by one so a malformed file is skipped.?reads each idle peer's transcript tail in one batchedjqpass: a pendingAskUserQuestion(notool_resultyet) or a final text line ending in?.Testing
task ci: syntax, shellcheck, 206 tests in UTF-8 andLC_ALL=C, 75 fetcher tests in both locales.?from text and from a pending/answered/cancelled question prompt, unsafe session ids.busy.🤖 Generated with Claude Code