Skip to content

Honor per-thread unload delays in app-server - #55270

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/fcb82bd73a101260c51e2a8476f94320c23ac929
Oct 19, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/fcb82bd73a101260c51e2a8476f94320c23ac929

Conversation

@copyberry

@copyberry copyberry Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Honor per-thread unload delays in app-server

Why

Thread unload timing used the server-wide delay, ignoring per-thread configuration overrides. Clients need to control how long individual idle, unsubscribed threads remain loaded.

What changed

  • Resolve unload timing from each loaded thread's thread_unload_delay_secs configuration. Setting it to 0 allows immediate unloading once the thread has no subscribers or activity.
  • Allow this runtime retention override in experimentalPredictionMode forks while continuing to reject other configuration overrides. Reject negative values and delays too large to schedule.
  • Replace the source-specific immediate-unload behavior with explicit configuration.

Testing

Extend integration coverage for per-thread delays, unloading after active turns finish, fork overrides, and invalid prediction-fork delays. Verify that immediate unloading preserves persistent history and that cold resumes and ordinary nested forks use their default delay instead of retaining the previous runtime's override.

## Why

Thread unload timing used the server-wide delay, ignoring per-thread configuration overrides. Clients need to control how long individual idle, unsubscribed threads remain loaded.

## What changed

- Resolve unload timing from each loaded thread's `thread_unload_delay_secs` configuration. Setting it to `0` allows immediate unloading once the thread has no subscribers or activity.
- Allow this runtime retention override in `experimentalPredictionMode` forks while continuing to reject other configuration overrides. Reject negative values and delays too large to schedule.
- Replace the source-specific immediate-unload behavior with explicit configuration.

## Testing

Extend integration coverage for per-thread delays, unloading after active turns finish, fork overrides, and invalid prediction-fork delays. Verify that immediate unloading preserves persistent history and that cold resumes and ordinary nested forks use their default delay instead of retaining the previous runtime's override.

GitOrigin-RevId: fcb82bd73a101260c51e2a8476f94320c23ac929
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/fcb82bd73a101260c51e2a8476f94320c23ac929 branch from 2e540f2 to d28be12 Compare October 19, 2026 12:30
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-19T12:30:46.032074Z 2e540f2 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@copyberry
copyberry Bot merged commit d28be12 into main Oct 19, 2026
1 of 2 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/fcb82bd73a101260c51e2a8476f94320c23ac929 branch October 19, 2026 12:30
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 19, 2026

This branch was previously deployed

1 inactive deployment
issue-triage — d28be125 Deployed Oct 19, 2026 by vesperale1112 via Identify potential duplicates (all issues) #56948
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants