Skip to content

Codex trust preflight resolves before its queued write settles #23146

Closed as not planned

Description

@nwparker

The local Codex branch of agentTrust:markTrusted discards the Promise returned by the queued trust writer. Renderer preflight can resolve before that mutation settles; a delayed rejection also escapes the intended best-effort catch.

A mock-only reproduction through the real renderer preflight and main IPC handler, using the actual config queue, admits one continuation while its predecessor still holds the queue and zero writes have begun. Awaiting the existing Promise keeps admission at zero until the write settles. A test through the actual session-continuation caller confirms the same ordering.

Scope: repair IPC completion/error containment; no performance-gain or observed live-prompt claim. Recognized native Codex launch preparation already awaits trust again deeper in the stack. The fix trades earlier admission for waiting on the existing queue; it adds no timeout, so a stuck predecessor can leave the caller pending indefinitely. Publish separately from no-downside performance fixes.

Coverage:11 new mocked tests pass versus4 failures on the original;32 focused tests pass, node/scoped-test typechecks and focused lint/format checks pass. No actual config mutation, live CLI/PTY, native app or remote provider execution. Windows/Linux/WSL and CI soak remain gaps.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions