Research on CLI options done with AI assistance. Concept and use cases are human-driven.
Problem
AI agents like Claude Code and OpenCode have their own internal session IDs that persist conversation history. When tmux sessions restart (laptop reboot, agent upgrade, container rebuild), users lose continuity because AOE doesn't track these agent session IDs.
Use Cases
- Laptop restart - Resume exact conversation state after reboot
- Agent upgrade - Update agent binary across all AOE sessions while preserving conversations
- Session recovery - Restore accidentally killed sessions
Agent Support
Both Claude Code and OpenCode support session resume:
| Agent |
Resume Flag |
Example |
| Claude Code |
-r / --resume |
claude --resume abc123-def456 |
| OpenCode |
-s / --session |
opencode --session abc123 |
Proposed Approach
- Add
agent_session_id: Option<String> to session storage
- Capture session ID after agent launch (parse output or read agent's session files)
- Pass resume flag on subsequent launches when session ID is known
- Add keybinding for "restart with session resume"
Questions
- Should this be automatic or opt-in?
- How to handle sandboxed sessions with different config paths?
- Which agents to prioritize?
Happy to discuss the approach before diving into implementation details.
Research on CLI options done with AI assistance. Concept and use cases are human-driven.
Problem
AI agents like Claude Code and OpenCode have their own internal session IDs that persist conversation history. When tmux sessions restart (laptop reboot, agent upgrade, container rebuild), users lose continuity because AOE doesn't track these agent session IDs.
Use Cases
Agent Support
Both Claude Code and OpenCode support session resume:
-r/--resumeclaude --resume abc123-def456-s/--sessionopencode --session abc123Proposed Approach
agent_session_id: Option<String>to session storageQuestions
Happy to discuss the approach before diving into implementation details.