fix: support --session name lookups in --status and track detached session lifecycle (#101)#102
Merged
fix: support --session name lookups in --status and track detached session lifecycle (#101)#102
Conversation
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: #101
…session lifecycle - ExecutionStore.get() now tries UUID match first, then falls back to session name lookup (stored in options.sessionName) - queryStatus() enriches detached execution status by checking if the actual screen/tmux/docker session is still running - Detached mode no longer marks execution as "executed" immediately; keeps status as "executing" so --status accurately reflects reality - Updated --status help text to indicate it accepts UUID or session name Fixes #101 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…essions, add isolation tracking - ExecutionStore::get() now tries UUID match first, then falls back to session name lookup (stored in options.sessionName) - query_status() enriches detached execution status by checking if the actual screen/tmux/docker session is still running via is_detached_session_alive() - Added execution record tracking to run_with_isolation() which was previously missing entirely - isolation executions were invisible to --status - Detached mode keeps record as "executing" so --status accurately reflects that the session is still running - Updated --status help text to indicate it accepts UUID or session name Fixes #101 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…atus enrichment Tests for both JS (15 tests) and Rust (12 tests) covering: - ExecutionStore.get() lookup by UUID and session name - UUID match takes priority over session name - queryStatus() works with session names - isDetachedSessionAlive() for various backends - enrichDetachedStatus() correctly updates record status - CLI integration tests for --status with session names Fixes #101 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Includes: - Detailed root cause analysis for all 4 bugs found - Timeline of events showing how the bugs manifest - Fix implementation details for both JS and Rust - Testing summary Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Compacted code in cli.js, main.rs, and execution_store.rs to meet the repository's 1000-line file size limit while preserving all functionality. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Merged
7 tasks
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
konard
added a commit
to link-assistant/hive-mind
that referenced
this pull request
Apr 8, 2026
…fallback (#1545) Per reviewer feedback, remove the extractInternalUuid() parsing of $ CLI output and all internalUuid tracking through the codebase. Instead, rely solely on the screen -ls fallback for screen-backend session monitoring. The proper fix for $ --status session name lookups will come from upstream (link-foundation/start#102). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The SSH session liveness check uses libc::kill which is not available on Windows. Wraps the call in #[cfg(unix)] block, matching the pattern already used in execution_store.rs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Member
Author
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
📊 Context and tokens usage:
Claude Opus 4.6:
Total: 213.3K + 26.4M cached input tokens, 62.5K output tokens, $16.110482 cost Claude Haiku 4.5: Total: 153.9K + 1.8M cached input tokens, 15.3K output tokens (24% of 64K output limit), $0.451093 cost 🤖 Models used:
📎 Log file uploaded as Gist (5711KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
Member
Author
✅ Ready to mergeThis pull request is now ready to be merged:
Monitored by hive-mind with --auto-restart-until-mergeable flag |
This reverts commit dd3aced.
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
Fixes #101 — Two bugs prevent reliable session tracking when using
--isolated screen --detached --session <custom-name>:--status <session-name>now works —ExecutionStore.get()tries UUID match first, then falls back to session name lookup (stored inoptions.sessionName)run_with_isolation()now tracks executions — Previously, isolation-mode executions were invisible to--statusin the Rust implementationRoot Causes Found
--status my-sessionfailsget()only searched by UUID fieldexecution-store.js:477,execution_store.rs:522executedimmediatelycomplete(exitCode)called right after wrapper exitscli.js:607run_with_isolation()never createdExecutionRecordmain.rs:422-644Changes
js/src/lib/execution-store.jsget()supports session name fallbackjs/src/lib/status-formatter.jsisDetachedSessionAlive(),enrichDetachedStatus()js/src/bin/cli.jsjs/src/lib/args-parser.js--statushelp textrust/src/lib/execution_store.rsget()supports session name fallbackrust/src/lib/status_formatter.rsis_detached_session_alive(),enrich_detached_status()rust/src/bin/main.rsrun_with_isolation(), detached keeps "executing"rust/src/lib/args_parser.rs--statushelp textjs/test/session-name-status.test.jsrust/tests/session_name_status_test.rsdocs/case-studies/issue-101/Test plan
bun test test/session-name-status.test.js)cargo test --test session_name_status_test)cargo build)$ --isolated screen --detached --session test-session -- sleep 60then$ --status test-sessionshows "executing"$ --status test-sessionshows "executed"🤖 Generated with Claude Code