Skip to content

Bucket /sessions in claude-sessions and run the skill on Haiku - #264

Merged
haacked merged 1 commit into
mainfrom
haacked/sessions-script-buckets
Oct 28, 2026
Merged

haacked merged 1 commit into
mainfrom
haacked/sessions-script-buckets

Conversation

@haacked

@haacked haacked commented Oct 28, 2026

Copy link
Copy Markdown
Owner

/sessions ran on Sonnet and did all the bucketing, dependency inference, and table layout itself. With 19 live sessions, claude-sessions --json printed about 40 KB, too much to show inline, so the model had to save it to a file and jq fields out of it first. It also put a session that had been idle for 21 days in Waiting on something outside, because its old tail said it was waiting on a reviewer.

claude-sessions --plan now applies every rule that only needs structured facts, and prints just the checks that need judgment, with the tail only where a check reads it. That's 6 KB for 18 sessions on the same machine. claude-sessions --render <file> takes the model's answers on stdin and prints the finished table. It's a second call because a dependency the model infers from a tail changes the nesting and the Approved and Held rules. With that, the skill runs on Haiku. A session idle more than two days now skips every rule that reads its tail. An old session with an approved, unqueued PR still shows up in Needs you, but one whose only signal is its tail goes to Stale.

Test plan

  • bin/lib/test-claude-sessions.sh passes (365 assertions).
  • Ran --plan and --render against live sessions. The groups match the old rules except for the Stale change.
  • Run /sessions and /sessions --act and check the table.

https://claude.ai/code/session_01WXojGBT72nfAc2yKaWBpJ1

claude-sessions --plan applies the bucket rules that need only structured
facts and prints just the checks that need judgment. --render takes the
skill's answers on stdin and draws the nested table. The rules live in
bin/lib/claude-sessions.jq. A session idle more than two days skips every
rule that reads its tail.

Claude-Session: https://claude.ai/code/session_01WXojGBT72nfAc2yKaWBpJ1
@haacked
haacked marked this pull request as ready for review October 28, 2026 19:36
@haacked
haacked merged commit 240cdba into main Oct 28, 2026
1 check passed
@haacked
haacked deleted the haacked/sessions-script-buckets branch October 28, 2026 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant