Skip to content

Support native Codex choice questions - #4044

Merged
ymichael merged 8 commits into
get-bb:mainfrom
maheen-ejaz:codex/askuserquestion-persistence
Oct 2, 2026
Merged

ymichael merged 8 commits into
get-bb:mainfrom
maheen-ejaz:codex/askuserquestion-persistence

Conversation

@maheen-ejaz

@maheen-ejaz maheen-ejaz commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Human comments

What was wrong

BB did not recognize Codex native request_user_input requests. Native questions could not reach BB's question UI, and the answer bridge parsed question outcomes as approvals, rejecting answers before delivery to Codex.

What changed

Translate native Codex questions into existing pending interactions and deliver selected option labels and free-text answers through the native answer bridge. Validate incoming questions and reject secret-input requests because the existing form is not a confidential credential-entry surface.

Respect Codex's feature settings: BB does not enable experimental default-mode questions or filter their warnings. Users who explicitly enable native questions can use them; the adapter also handles future native defaults if the protocol remains compatible. The Ask User Question plugin remains available to Codex when enabled, providing questions without the experimental flag.

No new UI, database migration, public SDK/CLI fields, or server/daemon wire changes. Existing interaction APIs and CLI commands apply.

How you verified

  • Turbo: 332 Codex provider tests and 35 Ask User Question plugin tests, plus lint/typecheck; five server provider-registration/tool-availability tests passed.
  • Live Codex using the enabled Ask User Question plugin without the experimental flag received a selected answer and replied “You chose green.”
  • Final-head live native verification with a disposable project opt-in generated a question, accepted Green and returned “Green.” No feature override or warning filter is set by BB.
  • Earlier live native verification covered selected/free-text delivery, reload and cancellation; native translation and answer-bridge code remain unchanged.
  • Bridge regression fails without the answer parser fix and passes with it.

Final-head CI: 21 passed, four skipped, no failed or pending checks.

Fixes #4678

AGENT GENERATED

@maheen-ejaz
maheen-ejaz force-pushed the codex/askuserquestion-persistence branch from 5174967 to db87310 Compare September 22, 2026 02:45
# Conflicts:
#	apps/app/src/components/thread/user-questions/UserQuestionInteractionContent.tsx
#	apps/server/test/services/plugins/ask-user-question-plugin.test.ts
@ymichael ymichael changed the title Keep Codex user questions answerable Enable Codex choice questions Oct 2, 2026
@ymichael ymichael changed the title Enable Codex choice questions Support native Codex choice questions Oct 2, 2026
@ymichael
ymichael merged commit 4543924 into get-bb:main Oct 2, 2026
25 checks passed
ymichael added a commit that referenced this pull request Oct 5, 2026
## Human comments

## What was wrong

Partial question answers lived only in the mounted React form. Switching
to another thread or reloading the page reset selections, free text, and
the current question before the user submitted them.

## What changed

Persist drafts for native provider questions and the real Ask User
Question plugin by thread and interaction identity. Restore partial
selections, exact free text, and question position; validate saved
values and ignore changed question definitions. Retain drafts on failed
submit/cancel and clear them after success, without erasing answers
edited while an older submission was pending. Browser storage failures
fall back to memory for navigation.

Drafts are browser/device-local with no cross-device synchronization or
time expiry. Server pending state controls whether a form can appear:
resolving an interaction elsewhere can leave inert local data until site
data is cleared. Only these two question forms opt in; secret-request
forms do not persist drafts. Older clients ignore the new namespace. No
database migration, public SDK/CLI surface, or daemon protocol change.
Documented in `docs/debugging-and-qa.md`.

## How you verified

- Regression fails on the original shared form: navigation loses the
second-question position and draft answers.
- Turbo: 34 focused app tests and 35 Ask User Question plugin tests
pass; app/shared-ui/plugin typechecks and lint pass.
- Final-head real Claude native questions and real Codex Ask User
Question plugin forms: matched base/head multi-question navigation and
reload; selected options, exact Notes free text, and question 2 of 3
survive. New interactions start empty even with inert older local
drafts. Successful submit and cancel clear storage; resolved/canceled
forms stay closed after reload. Both providers acknowledge submitted
answers.
- Supplemental injected HTTP 503 submit/cancel failures retain both
forms and drafts through reload. Storage-full/corruption/identity
isolation are covered by focused tests.
- Regenerated the published component registry and verified its
tests/typecheck plus all fork checks in CI.
- Final-head CI: 31 passed, three skipped, no failed or pending checks.
Persistent clean-head `pnpm start:worktree` review fixture:
https://ymichael--23106.getbb.app/projects/proj_rbdqqa8ssj/threads/thr_bebmcxdkui.
Handoff: `/Users/michael/.bb/thread-storage/thr_u497kinnh5/HANDOFF.md`.
- Overlap checked: #4044 is merged and rejects secret Codex inputs;
#4697 is closed/unmerged and addresses provider cancellation, without
overlapping form/storage code. Neither branch changed.

> 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.

Codex choice prompts render as plain text in default mode

2 participants