Summary
Multi-turn session support, mirroring claude_wrapper's Session/SessionServer.
CodexWrapper.Session — in-process session state, threads session_id
CodexWrapper.SessionServer — GenServer wrapper for long-lived sessions
- Uses
codex exec resume under the hood for continuations
Session API
session = CodexWrapper.Session.new(config)
{:ok, session, result} = CodexWrapper.Session.send(session, "implement the feature")
{:ok, session, result} = CodexWrapper.Session.send(session, "now add tests")
CodexWrapper.Session.total_cost(session)
SessionServer API
{:ok, pid} = CodexWrapper.SessionServer.start_link(config: config)
{:ok, result} = CodexWrapper.SessionServer.send_message(pid, "hello")
CodexWrapper.SessionServer.total_cost(pid)
CodexWrapper.SessionServer.history(pid)
Acceptance criteria
Depends on
Reference
- claude_wrapper:
lib/claude_wrapper/session.ex, lib/claude_wrapper/session_server.ex
- codex-wrapper (Rust):
ExecResumeCommand in exec.rs
Summary
Multi-turn session support, mirroring claude_wrapper's Session/SessionServer.
CodexWrapper.Session— in-process session state, threads session_idCodexWrapper.SessionServer— GenServer wrapper for long-lived sessionscodex exec resumeunder the hood for continuationsSession API
SessionServer API
Acceptance criteria
Session.new/2,Session.send/3,Session.stream/3Session.total_cost/1,Session.history/1,Session.turn_count/1SessionServerGenServer withstart_link/1,send_message/3SessionServerstatus functions:total_cost/1,history/1, etc.Depends on
Reference
lib/claude_wrapper/session.ex,lib/claude_wrapper/session_server.exExecResumeCommandin exec.rs