forge: detect channel status from Claude's transcripts, not the status line #15
No reviewers
Labels
No labels
bug
docs
enhancement
good first issue
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pedromcaraujo/forge!15
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "status-dots-without-statusline"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The per-channel status dots keyed off a
$0.71-style spent-cost readout inClaude's status line. That readout isn't present in a customised status line,
so every channel with a live conversation started reporting "fresh".
/statusnow reads the session state from Claude's own transcripts: slugifythe pane's
#{pane_current_path}to~/.claude/projects/<slug>/and checkwhether any session
.jsonlwas written at or after#{session_created}.Claude appends on every turn, so this holds whatever the status line renders.
The screen scrape stays as a fallback for when the projects directory can't
answer (missing/unreadable, or a pane whose cwd moved), but now keys off the
transcript's own rendering — the
⏺/⎿bullets and the running-turn hint —rather than the status line.
FORGE_CLAUDE_PROJECTSoverrides the projects root for testing. Theforge-tmuxservice runs as the session owner with noProtectHome, so itcan read the directory.
Test plan
/statusagainst six live channels — all six classify correctly,including
nixos(fresh: placeholder prompt, 0% context) vshomelab(active: 103.9k context). The old cost heuristic called every one fresh.
⏺left in the visible scrollback, so the transcriptcheck is doing work the screen scrape couldn't.
/home/pma/workspace/wine_radar→-home-pma-workspace-wine-radar.