Skip to content

Fix session lifecycle classification for idle tmux shells#2829

Merged
sigridjineth merged 1 commit intomainfrom
fix/issue-320-session-lifecycle-classification
Apr 29, 2026
Merged

Fix session lifecycle classification for idle tmux shells#2829
sigridjineth merged 1 commit intomainfrom
fix/issue-320-session-lifecycle-classification

Conversation

@Yeachan-Heo
Copy link
Copy Markdown
Contributor

Summary

  • add a small tmux-pane metadata classifier for session lifecycle: running_process vs idle_shell vs saved_only
  • surface lifecycle in claw status JSON/text and /session list text/resume JSON details
  • mark dirty idle/saved worktrees with an abandoned signal for clawhip/operator triage

Verification

  • cargo test -p rusty-claude-cli
  • cargo check -p rusty-claude-cli
  • cargo run -p rusty-claude-cli -- status --output-format json | python3 -m json.tool

Notes

  • cargo clippy -p rusty-claude-cli --all-targets -- -D warnings was attempted but is blocked by pre-existing clippy::unnecessary_wraps warnings in rust/crates/commands/src/lib.rs (render_mcp_report_for, render_mcp_report_json_for), outside this diff.

Fixes #320

Operator status previously treated any tmux pane in a workspace as equivalent to active work. The new classifier uses tmux pane command/path metadata as a soft signal, treats plain shells as idle, and adds dirty-worktree abandoned markers to status and session-list output for clawhip consumers.

Constraint: Keep issue #320 prototype minimal and additive without new dependencies

Rejected: Screen-scraping pane output | fragile and broader than needed for lifecycle classification

Confidence: high

Scope-risk: narrow

Tested: cargo test -p rusty-claude-cli

Tested: cargo check -p rusty-claude-cli

Not-tested: cargo clippy -p rusty-claude-cli --all-targets -- -D warnings is blocked by pre-existing commands crate clippy::unnecessary_wraps warnings
@sigridjineth sigridjineth merged commit 1011a83 into main Apr 29, 2026
4 checks passed
@sigridjineth sigridjineth deleted the fix/issue-320-session-lifecycle-classification branch April 29, 2026 07:12
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.

合影留念

2 participants