Context
PR #15 added bidirectional Claude conversation sync. Codex is the next priority for agent parity (per user, Codex + Pi before Gemini).
Today: pushing a workspace with an active Codex pane → Codex launches on the remote with a fresh conversation. We strip args and run bare `codex` (see `src-tauri/src/terminal/daemon_backed.rs` around line 488).
What needs research first
Before writing code, document the answers to these in a comment on this issue:
- Where does Codex store conversation history? (`
/.codex/`, `/.config/openai-codex/`, or somewhere else?)
- What's the file/path layout? Per-project files like Claude, or a single DB like OpenCode, or something else?
- What's the resume command? `codex --resume `, `codex chat resume`, or interactive-only?
- How to capture the session id? Hooks like Claude, plugin like OpenCode, output scanning, or file watching?
Look at:
Acceptance criteria
- Push workspace with a Codex pane → conversation continues on remote
- Pull back → conversation continues on laptop
- 3+ push/pull cycles preserve full history
Implementation pattern
Mirror what PR #15 did for Claude (commit `495f62f`):
- Helper in `src-tauri/src/commands/hosts.rs` to rsync (or extract+merge if DB-shaped) the per-workspace Codex session data between laptop and remote. Reuse the path-encoding pattern from `crate::ssh::claude_project_dir_name` if Codex's layout is similar
- Register a Codex adapter in `src-tauri/src/session_adapters.rs` — currently only `claude-code` exists (see line 115–128)
- Session-id capture via whatever Codex provides — emit to `adapter_captures["codex_session_id"]` on the active `TerminalSessionSnapshot`
- Remote-relaunch branch in `src-tauri/src/terminal/daemon_backed.rs` (around line 488–573) that builds the correct `codex --resume` invocation
References
Out of scope
Estimate
If Codex is per-cwd file-based (like Claude): ~2 hours.
If Codex is DB-based (like OpenCode): ~half-day.
Research first, estimate after.
Context
PR #15 added bidirectional Claude conversation sync. Codex is the next priority for agent parity (per user, Codex + Pi before Gemini).
Today: pushing a workspace with an active Codex pane → Codex launches on the remote with a fresh conversation. We strip args and run bare `codex` (see `src-tauri/src/terminal/daemon_backed.rs` around line 488).
What needs research first
Before writing code, document the answers to these in a comment on this issue:
/.codex/`, `/.config/openai-codex/`, or somewhere else?)Look at:
Acceptance criteria
Implementation pattern
Mirror what PR #15 did for Claude (commit `495f62f`):
References
Out of scope
Estimate
If Codex is per-cwd file-based (like Claude): ~2 hours.
If Codex is DB-based (like OpenCode): ~half-day.
Research first, estimate after.