Skip to content

Preserve Codex context windows and reuse app servers - #581

Merged
SDSLeon merged 2 commits into
masterfrom
poracode/steady-lantern-704b94ec
Aug 18, 2026
Merged

Preserve Codex context windows and reuse app servers#581
SDSLeon merged 2 commits into
masterfrom
poracode/steady-lantern-704b94ec

Conversation

@SDSLeon

@SDSLeon SDSLeon commented Aug 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • Preserve saved Codex context windows for legacy new-thread drafts, including delayed shared-settings hydration.
  • Keep unrelated local draft edits while inheriting the missing provider context, and preserve explicit context choices.
  • Keep Codex GUI threads with different context windows on the shared app-server process.

Root cause

Older project drafts can contain a model and effort but no contextSize. Draft initialization and the broad pre-hydration local-edit guard could make the temporary capability default authoritative before the saved provider preset arrived. Context selection belongs to each Codex thread, so it must not be added to the shared app-server pool key.

Impact

Fresh Codex chat threads now launch with the context window shown in the composer without requiring the user to reopen the selector. Existing threads retain the context window established when they were created.

Validation

  • pnpm run fmt:check
  • pnpm run typecheck
  • pnpm run lint
  • Focused Vitest coverage: 75 tests passed
  • Full Vitest run exercised 8,885 passing tests; it still exits nonzero on an unrelated existing SupervisorRuntime teardown rejection in src/supervisor/runtime.test.ts

- Inherit saved provider context sizes for older project drafts
- Reuse Codex app-server processes across thread context windows
- Add regression coverage for draft resolution and pooling
@SDSLeon
SDSLeon marked this pull request as ready for review August 18, 2026 18:00
@SDSLeon
SDSLeon merged commit e1faf57 into master Aug 18, 2026
8 checks passed
@SDSLeon
SDSLeon deleted the poracode/steady-lantern-704b94ec branch August 18, 2026 18:17
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