Expose turn/steer in the TypeScript SDK
What variant of Codex are you using?
SDK (TypeScript, @openai/codex-sdk v0.104.0)
What feature would you like to see?
The app-server protocol already supports turn/steer for injecting user messages into an active turn (added in v0.99.0). The TypeScript SDK doesn't expose this — Thread only has run() and runStreamed().
For reference, the Claude Code SDK already exposes this via streamInput() on the Query object. Would be great to have parity in the Codex SDK.
Something like this on Thread would be enough:
thread.steer(input: Input, expectedTurnId?: string): Promise<void>
Or alternatively on StreamedTurn:
const { events, steer } = await thread.runStreamed(prompt);
// later, while events are still streaming:
await steer("also check the tests");
The protocol message is already there (turn/steer with threadId, input, expectedTurnId), it just needs to be wired through the SDK.
Happy to open a PR for this if the team is open to it — the change should be fairly contained (add a method to Thread that sends the turn/steer JSONL message to the subprocess).
Additional information
Related issues: #10469 (steering in desktop app), #11415 (codex inject CLI).
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗