Skip to content

Commit 838af70

Browse files
xuiocodex
andcommitted
Add queued Codex session steering
Co-Authored-By: OpenAI Codex <noreply@openai.com>
1 parent bbb1d5b commit 838af70

13 files changed

Lines changed: 1521 additions & 49 deletions

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,14 @@ After startup, ask Claude to use Codex subagents, or invoke the plugin skill:
159159

160160
`start_codex_session` and `continue_codex_session` are the preferred front doors for daemonless persistent Codex sessions.
161161

162+
`start_codex_session_async` starts a persistent Codex session and returns a `session.id` immediately while Codex keeps working.
163+
164+
`send_codex_session_prompt` queues an additional prompt onto an active or idle Codex session. It returns immediately by default and can also wait for completion.
165+
166+
`steer_codex_session` inserts a high-priority steering prompt into a persistent Codex session. By default it runs after the active turn; `interrupt_current: true` cancels the active turn and runs the steering turn next.
167+
168+
`get_codex_session` and `wait_codex_session` inspect or wait for long-running Codex sessions and queued turns.
169+
162170
`run_agent` launches one Codex `exec` process and waits for it. It uses the same bounded queue as async jobs and remains available for lower-level/manual control.
163171

164172
`run_agents` launches multiple Codex `exec` processes concurrently with a bounded `max_parallel` setting and the global queue.
@@ -171,7 +179,7 @@ After startup, ask Claude to use Codex subagents, or invoke the plugin skill:
171179

172180
`get_agent_run`, `wait_agent_run`, and `cancel_agent_run` inspect, wait for, or cancel async jobs.
173181

174-
`start_session`, `send_session_prompt`, `get_session`, `list_sessions`, and `cancel_session` manage daemonless persistent Codex sessions using Codex's own resumable thread ids. They are compatibility aliases behind `start_codex_session` and `continue_codex_session`.
182+
`start_session`, `send_session_prompt`, `get_session`, `list_sessions`, and `cancel_session` manage daemonless persistent Codex sessions using Codex's own resumable thread ids. They are compatibility aliases behind the intuitive session tools.
175183

176184
`codex_status` reports the resolved Codex binary, server working directory, Claude project directory, default model, default reasoning effort, feature sets, and version probe.
177185

@@ -183,7 +191,7 @@ Prefer `start_agent_run` or `start_agents_run` for work that may run longer than
183191

184192
Async job snapshots expose partial stdout/stderr and parsed event summaries through `get_agent_run` while work is still running.
185193

186-
When a client supports MCP progress tokens, `ask_codex`, `ask_codex_parallel`, `start_codex_session`, `continue_codex_session`, `run_agent`, `run_agents`, `run_agents_aggregate`, `start_session`, `send_session_prompt`, `start_agent_run`, `start_agents_run`, `get_agent_run`, `wait_agent_run`, and `cancel_agent_run` send progress notifications. SDK clients should pass an `onprogress` handler and enable timeout reset on progress for long waits.
194+
When a client supports MCP progress tokens, `ask_codex`, `ask_codex_parallel`, `start_codex_session`, `continue_codex_session`, `start_codex_session_async`, `send_codex_session_prompt`, `steer_codex_session`, `wait_codex_session`, `run_agent`, `run_agents`, `run_agents_aggregate`, `start_session`, `send_session_prompt`, `start_agent_run`, `start_agents_run`, `get_agent_run`, `wait_agent_run`, and `cancel_agent_run` send progress notifications. SDK clients should pass an `onprogress` handler and enable timeout reset on progress for long waits.
187195

188196
## License
189197

0 commit comments

Comments
 (0)