| … | … | @@ -5695,17 +5685,62 @@ export const makeCodexAdapterV2 = Effect.fn("makeCodexAdapterV2")(function* ( | |
| 5719 | + | nativeThreadId, | |
| 5720 | + | }); | |
| 5721 | + | yield* client | |
| 5722 | + | .request("thread/goal/set", { threadId: nativeThreadId, status: "paused" }) | |
🟠 High Adapters/CodexAdapterV2.ts:5722
If Codex stays connected but never answers thread/goal/set, the completed run never settles and hold.next is never resolved. pauseUncontinuedGoal deletes the hold before awaiting this request, so the later releaseGoalHold cannot recover it; bound the pause request so local settlement proceeds even without a provider response.
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
| 1 | In file @apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts around line 5722: |
| 2 | |
| 3 | If Codex stays connected but never answers `thread/goal/set`, the completed run never settles and `hold.next` is never resolved. `pauseUncontinuedGoal` deletes the hold before awaiting this request, so the later `releaseGoalHold` cannot recover it; bound the pause request so local settlement proceeds even without a provider response. |
Note
🤖 Claude Opus 5.5 responding on behalf of Theo
Fixed in d19040a4ee. The expiry pause request now times out after 10 s, so the claimed hold settles even when Codex never answers. New test settles the run when Codex never answers the expiry pause fails without the timeout and passes with it.