You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(examples): support Codex question tool (item/tool/requestUserInput) in combined-app (#142)
## Summary
- **Support the Codex question tool end to end in the combined-app.**
`item/tool/requestUserInput` (the agent asking the user something
mid-turn) was already routable in the SDK but the app silently answered
it with empty answers. Now:
- `codex-manager` registers a handler **in every approval mode** (it's a
question, not a permission gate), broadcasts a `user_input_request` WS
event, and parks the JSON-RPC response until the user answers via the
new `POST /api/user-input-response` route (values validated as string
arrays). Pending questions resolve empty on shutdown.
- New `UserInputPrompt` component renders each question's header/text,
options as selectable buttons (description as tooltip), an "Other"
free-text field when `isOther` (masked for `isSecret`, and always shown
when a question has no options so it's never unanswerable), and a Submit
gated on all questions being answered.
- `requestTimeoutMs` now uses the 10-minute window in all modes
(previously interactive-only) so the SDK doesn't auto-resolve the
question with empty answers after 60s while the user is reading it. Note
this also lengthens outgoing request timeouts in auto-approve mode,
matching interactive mode's existing behavior.
- **SDK:** export the `ToolRequestUserInput*` protocol types from the
codex entry point (previously only reachable via the `v2` namespace).
- **Combined-app:** default the Codex model to `gpt-5.6-sol` when the
setup form leaves it empty; setup card hint/placeholder updated to
match.
## Test plan
- [x] Added SDK test covering the custom `item/tool/requestUserInput`
handler round-trip (answers written back on the wire with the request
id); default-response path was already covered. `bun test src/codex`: 40
pass.
- [x] SDK typecheck (`tsc --project tsconfig.check.json`) and
combined-app typecheck (`tsc --noEmit`) clean.
- [x] `bun run lint` clean.
- [ ] Manual: start a Codex session in the combined-app, trigger a
`request_user_input` question, answer via option / Other text, confirm
the turn continues with the chosen answer.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
0 commit comments