codex-steer
v0.1.6
Published
Tiny Codex app-server wrapper for starting and steering runs or reviews.
Readme
codex-steer
Tiny wrapper around codex app-server for the workflow codex exec does not cover:
- Start a long-running Codex turn from one command.
- Stream live agent output to stdout.
- Send follow-up steering messages from another command using a friendly id.
- Start a Codex review through
review/startand try steering it by id.
It uses Codex's app-server stdio transport and the real turn/steer and review/start APIs.
Install
npm install -g codex-steerOr from a checkout:
npm linkOr directly from GitHub:
npm install -g github:01-1/codex-steerFor an SSH-only setup, use the full Git URL:
npm install -g git+ssh://[email protected]/01-1/codex-steer.gitUsage
Start a run:
cxrun fix-tests "fix the failing tests"Choose a model for a run:
cxrun --model gpt-5.4 fix-tests "fix the failing tests"Choose the reasoning effort, with or without a model override:
cxrun --model gpt-5.4 --effort high fix-tests "fix the failing tests"The selected model and effort are saved with the id and reused by later continuations.
Send a message using either alias:
cxrun steer fix-tests "only change the parser"
cxrun send fix-tests "only change the parser"Both commands steer the active turn when one is running, or start a continuation on the saved thread after it completes:
cxrun send fix-tests "now add the regression test"Change the model when starting that continuation:
cxrun send --model gpt-5.4 fix-tests "now add the regression test"
cxrun send --effort high fix-tests "now add the regression test"You can also select a different model with either alias:
cxrun steer --model gpt-5.4 fix-tests "use the new model on the next turn"
cxrun send --model gpt-5.4 fix-tests "use the new model on the next turn"
cxrun steer --effort high fix-tests "use high effort on the next turn"If a turn is already running, app-server cannot change that turn's model or effort: the message is handled with the current settings and the selection applies to subsequent turns. If the previous turn has completed, the continuation starts with the selected settings immediately.
Read a multiline prompt or steering message from stdin:
cat prompt.txt | cxrun refactor -
printf 'stop broad refactors\nfocus on auth only\n' | cxrun send refactor -Inspect or stop active ids:
cxrun status
cxrun stop fix-testsIds cannot be reused. Use cxrun steer <id> <message...> or cxrun send <id> <message...> to continue a saved thread instead of starting a new run with the same id.
Completed, interrupted, stopped, failed, and stale runs leave a small state file with the last known threadId and turnId, so cxrun send <id> <message...> can continue the thread after the process is gone.
Reviews
Start a review of uncommitted changes:
cxreview my-reviewChoose a model for a review:
cxreview --model gpt-5.4 --effort high my-reviewReview against a base branch:
cxreview review my-review --against mainSend steering while the review is still running:
cxreview steer my-review "ignore generated files"Optional context after the id is sent as an immediate steering message after review/start:
cxreview my-review "focus on security and tests"Some Codex review turns may reject steering with activeTurnNotSteerable. When that happens, cxreview prints the exact JSON-RPC error returned by app-server.
Publishing
Validate the package:
npm test
npm pack --dry-runPublish the current version:
npm login
npm publishFor later releases, bump the version first:
npm version patch
npm publishNotes
- Requires
codexonPATH. --model <model>and--effort <level>override the configured Codex settings for a new run or review. They are also accepted after thesteerorsendcommand. Both settings are stored in that id's state and reused by later continuation turns.- Uses
codex app-server --stdiofor runs and reviews. While a run is active,cxrun steer/cxrun sendtalk to that wrapper process through a local socket in the state directory. After a run exits,cxrun sendresumes the saved thread and starts a new turn. cxrun daemon-startrunscodex app-server daemon startand enables app-server remote control for users who want the Codex-managed daemon separately.- Requires Node.js 18 or newer.
cxrun <id> <prompt...>streams assistant message deltas and selected command/file output deltas to stdout.cxrun steer <id> <message...>exits after the steering message has been accepted by an active app-server turn.cxreview <id>streams review output from Codex'sreview/startapp-server method.- State and run history pointers are stored in
${XDG_STATE_HOME:-~/.local/state}/codex-steer. SetCODEX_STEER_STATE_DIRto override it. - Set
CODEX_STEER_ENABLE_REMOTE_CONTROL=0to skipcodex app-server daemon enable-remote-controlwhen usingcxrun daemon-start.
