Repository navigation
feat(harness): Codex Elixir session feature parity - #4
Conversation
Implements 7 missing features in CodexSession GenServer: 1. Binary path + CODEX_HOME: resolve from providerOptions, pass env to Port 2. Version checking: semver parse + compare against minimum 0.37.0 3. Account/Spark gating: account/read RPC, downgrade spark for free/go/plus 4. Fast mode + effort: modelOptions.codex.fastMode → serviceTier, reasoningEffort 5. Plan mode: build collaborationMode with developer_instructions 6. Thread resume fallback: detect recoverable errors, retry with thread/start 7. Collab child suppression: track receiver threads, suppress 13 notification types Init flow: spawn → initialize → account/read → start_thread Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThe changes add Changes
Sequence Diagram(s)sequenceDiagram
participant Client as Client
participant Codex as Codex Session
participant CLI as Codex CLI
participant Account as Account Service
participant Thread as Thread Service
participant Notify as Notification Handler
Client->>Codex: Initialize
Codex->>CLI: Execute --version (timeout)
CLI-->>Codex: Version response
alt Version mismatch
Codex-->>Client: Startup failure
else Version OK
Codex->>Account: account/read (gating)
Account-->>Codex: Account snapshot + plan type
Codex->>Codex: Select model based on plan
alt Thread resume flow
Codex->>Thread: thread/resume
alt Resume succeeds
Thread-->>Codex: Resume response
else Resume fails (specific errors)
Codex->>Thread: thread/start (fallback)
Thread-->>Codex: Start response
end
else First start
Codex->>Thread: thread/start
Thread-->>Codex: Start response
end
Codex->>Codex: Store state (binary_path, codex_home, account, collab_receiver_turns)
Codex->>Notify: Track collab receiver threads
Codex-->>Client: Ready
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- Reply to ready_waiters in terminate/2 so callers get a meaningful
error instead of bare {:EXIT, pid, :normal} during handshake crashes
- Clear pending session/prompt entry on interrupt_turn to prevent stale
responses from completing the wrong turn after cancel + new turn
- Sanitize PII from test fixtures (real paths → /workspace/t3code-OTP,
session UUIDs → deterministic test values)
- Fix task doc: pending map key type String.t() → integer(), stale
authMethods path reference in Risk #4
- Add opencode.jsonc to .gitignore (contains API key)
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Summary
Implements 7 missing features in the Elixir
CodexSessionGenServer for full parity with the NodecodexAppServerManager.ts:account/readRPC, downgrade spark for free/go/plus plansbuild_collaboration_mode/3with full developer instructionsresolve_codex_binary/1, env var passed to Port.openmodelOptions.codex.fastMode→ serviceTier, reasoningEffort mappingInit flow changed:
spawn → initialize → account/read → start_threadTest plan
mix compile— compiles clean, no warnings🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes
Chores