Skip to content

Support Codex native async and synchronous user questions - #3917

Draft
ymichael wants to merge 1 commit into
mainfrom
bb/support-codex-native-user-questions-thr_65bfpathjy
Draft

ymichael wants to merge 1 commit into
mainfrom
bb/support-codex-native-user-questions-thr_65bfpathjy

Conversation

@ymichael

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

BB discarded Codex native async question metadata and rejected synchronous question RPCs. Native questions therefore had no structured answer path, and provider request cancellation could not close the exact pending interaction.

What changed

Support both native flows through the shared question UI and existing CLI/SDK interaction endpoints. Async answers become new user messages, steering active threads or starting idle ones; questions persist across reconnects and restarts. Synchronous answers resolve the original RPC and remain bound to its turn. Stop, provider resolution, and stale-answer handling close the appropriate request without detaching it. Stable native IDs prevent replay duplicates, and the timeline hides redundant native question text.

Enable Codex synchronous questions in Default mode. Requests wait for an answer, interruption, or provider resolution; BB does not adopt the TUI countdown. Reject secret questions before persistence. Keep AskUserQuestion fallback available because native tool availability depends on model/version. Preserve provider-neutral plugin form behavior.

Bump HOST_DAEMON_PROTOCOL_VERSION to 214 for targeted cancellation and native question event fields. Update the Codex provider skill with behavior and existing CLI/SDK answer paths; no new public API.

How you verified

  • Turbo provider tests: full suite (322 tests), then focused final schema/translation/session/RPC checks (136 tests).
  • Turbo server interaction/event tests (83 tests), with final late-event/replay suite (18 tests); host registry/client/app checks (42 tests); timeline (79 tests); runtime (123 tests, plus final cancellation checks); fallback (37 tests).
  • Turbo typechecks for app, server, host daemon, agent runtime, Codex provider and thread-view; final server/runtime checks passed after race fixes.
  • Isolated source app with installed Codex CLI 0.154.0: browser async answer and agent continuation, synchronous CLI choice plus notes, browser cancellation followed by CLI 409, full server/daemon restart preserving an async question followed by SDK answer, and successful AskUserQuestion fallback in a fresh thread.
  • Regression coverage for active/idle routing, stale/idempotent answers, interruption and exact RPC correlation, reconnect persistence, replay/timeline deduplication, and late questions after Stop. Temporary dev processes and fixtures cleaned up.

AGENT GENERATED

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant