Add acknowledged user message submission to core (#36385)

## What changed

- Add `CodexThread::submit_user_input_and_wait_for_admission` and export the
  `UserMessageAdmission` result through `codex-core-api`.
- Resolve submissions only after they start a new turn or steer the active
  turn, returning the accepting turn ID in either case.
- Return errors for invalid operations, rejected thread settings, and session
  termination instead of leaving admission waiters unresolved.

## Testing

Add integration coverage for concurrent start-and-steer submissions, settings
rejection and recovery, non-user operations, and submission after shutdown.

GitOrigin-RevId: 21f1ede38d399baa9836d61a59b9f9af2dbf83b8
This commit is contained in:
keith thornhill
2026-07-31 20:06:24 +00:00
committed by copyberry
parent 332eac4b85
commit bf7804c254
10 changed files with 500 additions and 10 deletions

View File

@@ -35,6 +35,7 @@ pub use codex_core::StartThreadOptions;
pub use codex_core::StateDbHandle;
pub use codex_core::ThreadManager;
pub use codex_core::ThreadShutdownReport;
pub use codex_core::UserMessageAdmission;
pub use codex_core::WaitForEnvironmentToolConfig;
pub use codex_core::build_models_manager;
pub use codex_core::config::Config;