Repository navigation
Support native Codex choice questions - #4044
Merged
ymichael merged 8 commits intoOct 2, 2026
Merged
Conversation
maheen-ejaz
force-pushed
the
codex/askuserquestion-persistence
branch
from
September 22, 2026 02:45
5174967 to
db87310
Compare
3 tasks done
# Conflicts: # apps/app/src/components/thread/user-questions/UserQuestionInteractionContent.tsx # apps/server/test/services/plugins/ask-user-question-plugin.test.ts
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
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human comments
What was wrong
BB did not recognize Codex native
request_user_inputrequests. 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
Final-head CI: 21 passed, four skipped, no failed or pending checks.
Fixes #4678