Skip to content

fix(codex): prepare threads on first use and replace missing rollouts - #961

Merged
GatewayJ merged 4 commits into
OpenCSGs:mainfrom
GatewayJ:fix/lazy-codex-thread
Nov 26, 2026
Merged

GatewayJ merged 4 commits into
OpenCSGs:mainfrom
GatewayJ:fix/lazy-codex-thread

Conversation

@GatewayJ

@GatewayJ GatewayJ commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

Changes

  • Mark a Codex worker ready after the app-server handshake and required runtime setup. Starting or restarting an idle worker sends no thread RPC.
  • Prepare the default or room thread on first use. Concurrent first messages share one preparation for their conversation.
  • If Codex reports a missing saved thread or rollout, create a new thread, save its ID under the same conversation, then send the message. Preserve the binding on other resume errors.
  • Keep the default ID in session_id and room bindings in conversation_sessions. Accept legacy state files and omit empty_threads on write.

Verification

  • Full Go suite and Codex runtime race tests.
  • Bundled Codex CLI 0.167.1 with a local model endpoint: cold resume of default and room threads, restart before first send, and a new message after a used rollout file goes missing.
  • Concurrent startup tests cover new, saved, and missing thread IDs for both default and room conversations.

@GatewayJ
GatewayJ requested a review from RussellLuo as a code owner November 26, 2026 06:18
@GatewayJ GatewayJ changed the title fix(codex): prepare default threads on first use fix(runtime): defer Codex threads and recover retried messages Nov 26, 2026
@GatewayJ GatewayJ changed the title fix(runtime): defer Codex threads and recover retried messages fix(codex): prepare threads on first use and replace missing rollouts Nov 26, 2026
@GatewayJ
GatewayJ merged commit 2b4e978 into OpenCSGs:main Nov 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant