Repository navigation
Codex misalignmentPolicyViolation in thread history prevents resuming conversations #10362
Description
Activity
Triage
Confirmed on current
main(223ff4490f764a74ff911589e97b9bbcd595fee8). This is a real Codex resume decode bug, not a duplicate of #8875.thread/resumeis strictly decoded against the generatedV2ThreadResumeResponseschema. A persisted failed turn withcodexErrorInfo: "misalignmentPolicyViolation"is rejected before a new turn starts, andisRecoverableThreadResumeErrordoes not treatdecode-payloadfailures as recoverable. That matches the reportedProviderAdapterProcessErrorand the need to abandon the conversation.The generated enum still accepts
rateLimitExceeded(from #8897) but notmisalignmentPolicyViolation:packages/effect-codex-app-server/src/_generated/schema.gen.ts(V2ThreadResumeResponse__CodexErrorInfo, also Read/Rollback)packages/effect-codex-app-server/scripts/generate.ts(applyCodex0151DefinitionCompatibilityonly appendsrateLimitExceeded)- Decode path:
packages/effect-codex-app-server/src/client.ts,packages/effect-codex-app-server/src/_internal/shared.ts - Resume fallback:
apps/server/src/provider/Layers/CodexSessionRuntime.ts
T3's pinned Codex protocol ref (
678157acaa819d5510adfe359abb5d0392cfe461) does not include this value. Currentopenai/codexmain does — added in openai/codex#38682. Codex TUI also treats it as a terminal safety stop (openai/codex#39261). T3 should still accept the historical value so the thread can be opened and the blocked status preserved.Suggested fix
Same pattern as #8897:
- Add
misalignmentPolicyViolationto the generator compatibility override for thread read/resume/rollbackCodexErrorInfo(also consider fork +turn/completednotifications). - Regenerate the schema.
- Add a synthetic fixture test like the existing
rateLimitExceededcase inpackages/effect-codex-app-server/src/schema.test.ts. - Keep the failed/safety-blocked status; do not map this value to
other.
A full protocol refresh would also pick this up, but previous resume-drift work (#8346, closed #8342) preferred compatibility overrides to avoid breaking older Codex CLIs. A durable unknown-enum fallback would prevent the next new
codexErrorInfofrom bricking history again.The later
Previous response owner account is unavailable(HTTP 502) andthread ... already has an active writererrors are separate and are not explained by this schema gap.- addedvia-triageFiled through npx t3 triageFiled through npx t3 triagebugSomething is broken or behaving incorrectly.Something is broken or behaving incorrectly.
on Sep 6, 2026 Opened #10373 with the compatibility override from triage:
misalignmentPolicyViolationis accepted on thread read/resume/rollback, plus fork andturn/completed. Decode keeps the variant instead of folding it intoother.Macroscope’s approvability check would have approved it; their correctness pass did not run because the workspace monthly spend cap was hit.
- added a commit that references this issue
on Sep 6, 2026
Codex misalignmentPolicyViolation in thread history prevents resuming conversations
What happened
The T3 Code desktop app on a MacBook Pro, connected to a Linux T3 server, fails to continue an existing Codex conversation. The server reports
ProviderAdapterProcessErrorwhile decodingthread/resume.The user reported having to delete affected threads and clarified: "had to use new chats lost history this is bad". They could continue only by starting new chats, losing access to their previous conversation history and continuity. This is a disruption requiring abandonment of existing conversations, not merely an error banner. Permanent deletion of the underlying Codex history has not been established.
Diagnosis
Read-only inspection of the matching Codex thread history found that historical turn index 20 has status
failedand this stored error:{"message":"This request was blocked by our safety systems.","codexErrorInfo":"misalignmentPolicyViolation","additionalDetails":null,"misalignment":null}The installed release's generated
V2ThreadResumeResponse__CodexErrorInfoschema inpackages/effect-codex-app-server/src/_generated/schema.gen.tsdoes not acceptmisalignmentPolicyViolation. The full resume response therefore fails validation before a new turn starts. The requested fix is to represent this historical provider error correctly while preserving its safety-blocked status.The current main schema fetched during triage also lacks this value. Main was observed at
223ff4490f764a74ff911589e97b9bbcd595fee8; the schema was fetched through the main URL. No newer release was listed at investigation time.Steps to reproduce
Inferred from the recorded failure; no new safety-blocked request was generated during triage:
codexErrorInfoismisalignmentPolicyViolation.thread/resume.A regression test can use a synthetic resume-response fixture containing that value.
Version
Server:
0.0.39-nightly.20260906.1293, commitd924fe266483e1d400775e3c3ce784f8e90f355f. Verified from the package used by the reported stack trace.Environment
7.0.0-31-generic, Nodev22.23.2, active systemd user service.Evidence
The matching persisted error is quoted above. No conversation content, credentials, or home directory paths are included.
Related issues
#8875 describes the same failure mechanism for
rateLimitExceeded. This release already accepts that value; this report concerns the distinct unsupportedmisalignmentPolicyViolationvalue. Exact-value and broader resume/policy searches found no matching report.Fix applied or workaround
The triage agent changed no application code, configuration, service state, or databases. The user resorted to new chats after deleting affected threads, losing access to the prior conversation history. Starting new chats allowed continued use but did not recover the affected conversations. There is no confirmed history-preserving recovery.
Follow-up read-only inspection also found recent, distinct session errors:
Previous response owner account is unavailable; retry later(HTTP 502) andthread ... already has an active writer. Their relationship to the broader usability complaint is not yet established; they are not evidence that the schema mismatch explains every failure.Filed by
Codex (GPT-6) via T3 triage.
Intended label:
via-triage.