Add Claude Code and Codex CLI session restore support#558
Open
thallada wants to merge 2 commits intotmux-plugins:masterfrom
Open
Add Claude Code and Codex CLI session restore support#558thallada wants to merge 2 commits intotmux-plugins:masterfrom
thallada wants to merge 2 commits intotmux-plugins:masterfrom
Conversation
Add automatic save/restore for Claude Code CLI sessions using the existing strategy pattern. When a pane running `claude` is saved, the restore strategy appends `--continue` to resume the most recent conversation in that working directory. If the original command already included `--continue` or `--resume`, it is preserved as-is so explicit session targets and all other CLI flags are not lost. Changes: - Add `claude` to default_proc_list in scripts/variables.sh - Create strategies/claude_session.sh (modeled after nvim_session.sh) - Register the "session" strategy for claude in resurrect.tmux - Add tests for strategy logic and wiring in tests/test_claude_strategy.sh - Update README.md to mention Claude Code support
Add automatic save/restore for OpenAI Codex CLI sessions using the existing strategy pattern. When a pane running `codex` is saved, the restore strategy replaces the command with `codex resume --last` to resume the most recent conversation in the working directory. Unlike Claude's `--continue` flag, Codex uses `resume` as a subcommand, so the original command (which may contain a prompt argument) is replaced rather than appended to. If the original command already contains a `resume` or `fork` subcommand, it is preserved as-is. Changes: - Add `codex` to default_proc_list in scripts/variables.sh - Create strategies/codex_session.sh (modeled after claude_session.sh) - Register the "session" strategy for codex in resurrect.tmux - Add tests for strategy logic and wiring in tests/test_codex_strategy.sh - Update README.md to mention Codex CLI support
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.
--continueto the original command, preserving all CLI flagscodex resume --last(uses a subcommand rather than a flag)