fix(sessions): preserve session state across screen detach/reattach - #1
Open
twall wants to merge 1 commit into
Open
fix(sessions): preserve session state across screen detach/reattach#1twall wants to merge 1 commit into
twall wants to merge 1 commit into
Conversation
- launch_session now routes to resume_session when task has claude_session_id, preventing conversation history loss when relaunching an existing task - _snapshot falls back to _last_selected_id if widget tree is torn down during SIGHUP (screen detach), fixing "current task resets on detach" - Track _last_selected_id on every TaskSelected event as a safe teardown fallback - Add `planner.cli launch` command for launching sessions from the CLI
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
launch_sessionnow detects existingclaude_session_idand routes toresume_session, preventing a new session from overwriting the DB reference and losing conversation history_snapshotwas callingquery_one(TaskPanel)during SIGHUP teardown — widget tree may already be gone, causing silent failure and state not saved; now falls back to_last_selected_idcached on each selection eventplanner.cli launch <id> [--cwd <path>]for launching sessions outside the TUITest plan
claude_session_id— verify it resumes the old conversation (not a blank new session)planner.cli launch <id>launches session and prints full_name