Repository navigation
refactor(codex): split app-server thread lifecycle - #108414
Merged
Merged
Conversation
steipete
force-pushed
the
codex/refactor-codex-thread-lifecycle
branch
from
July 15, 2026 18:13
2da5727 to
23d0fef
Compare
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 16, 2026
* refactor(codex): split thread lifecycle * refactor(codex): keep lifecycle types internal
zooqueen
pushed a commit
to zooqueen/openclaw
that referenced
this pull request
Sep 11, 2026
* refactor(codex): split thread lifecycle * refactor(codex): keep lifecycle types internal
This was referenced Oct 8, 2026
This was referenced Oct 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
The Codex app-server thread lifecycle lived in one 3,219-line module. That made ownership, review, and focused maintenance difficult, and required a max-lines suppression.
Why This Change Was Made
Split lifecycle orchestration, request I/O, supervision, request builders, binding policy, context-engine binding, fingerprints, model selection, prompts, timing, turn parameters, errors, and shared types into focused modules. Keep
thread-lifecycle.tsas the stable public facade, preserve behavior, and remove the obsolete max-lines baseline entry.Direct Codex contract check covered thread start/resume/read/fork/archive/inject-items, config reads, and MCP status handling in
codex-rs/app-server-protocolandcodex-rs/app-serverat upstream Codex38b064c31b1f7464b281006316ec878ed23fea77.AI-assisted: yes. Maintainer-directed refactor. The implementation and proof were reviewed before submission.
User Impact
No user-visible behavior change. Developers get smaller owner-focused modules, a stable import surface, and no grandfathered line-count exemption for this lifecycle.
Evidence
node scripts/run-vitest.mjs extensions/codex/src/app-server/thread-lifecycle.test.ts: 109 tests passed on the landed PR head.