Repository navigation
Unify model request hook lifecycles across sampling and compaction - #61562
Merged
copyberry[bot] merged 1 commit intoNov 14, 2026
Conversation
…61562) ## What changed - Pair `PreModelRequest` and `PostModelRequest` hooks per sampling or compaction attempt, with distinct lifecycle IDs and cancellation reporting. - Add `thread_id` and `kind` to hook inputs, distinguishing `sampling`, `foreground_compaction`, and `background_compaction`. Include the provider's `response_id` in post-hook inputs when available. - Wait for synchronous post-hooks before releasing terminal response events, accounting for usage, or installing compaction results. Allow streaming output and tool execution to proceed before the hook finishes, and cancel synchronous post-hooks when their owning request is interrupted. - Preserve incomplete-response, budget-exceeded, and hook-denied outcomes across sampling retries and compaction model fallback. ## Testing Add coverage for streaming and tool ordering, interrupted post-hooks, per-attempt metadata, and foreground and background compaction accounting and installation ordering. GitOrigin-RevId: 3e808c5b3bf2d5a6a326d9f5be5bbd0359b2d16e
copyberry
Bot
force-pushed
the
copyberry/codex-internal-to-codex-oss/3e808c5b3bf2d5a6a326d9f5be5bbd0359b2d16e
branch
from
November 14, 2026 19:40
be1662e to
81b995a
Compare
Contributor
Codex Review Summary: 🔄 RunningThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
copyberry
Bot
deleted the
copyberry/codex-internal-to-codex-oss/3e808c5b3bf2d5a6a326d9f5be5bbd0359b2d16e
branch
November 14, 2026 19:40
mangubot2026-dev
temporarily deployed
to
issue-triage
November 14, 2026 20:05 — with
GitHub Actions
Inactive
mangubot2026-dev
temporarily deployed
to
issue-triage
November 14, 2026 20:05 — with
GitHub Actions
Inactive
mangubot2026-dev
temporarily deployed
to
issue-triage
November 14, 2026 20:05 — with
GitHub Actions
Inactive
Drew593990
temporarily deployed
to
issue-triage
November 14, 2026 20:12 — with
GitHub Actions
Inactive
Drew593990
temporarily deployed
to
issue-triage
November 14, 2026 20:12 — with
GitHub Actions
Inactive
Drew593990
temporarily deployed
to
issue-triage
November 14, 2026 20:12 — with
GitHub Actions
Inactive
untitledlt
temporarily deployed
to
issue-triage
November 14, 2026 20:50 — with
GitHub Actions
Inactive
untitledlt
temporarily deployed
to
issue-triage
November 14, 2026 20:50 — with
GitHub Actions
Inactive
untitledlt
temporarily deployed
to
issue-triage
November 14, 2026 20:50 — with
GitHub Actions
Inactive
tguilarte
temporarily deployed
to
issue-triage
November 14, 2026 21:43 — with
GitHub Actions
Inactive
tguilarte
temporarily deployed
to
issue-triage
November 14, 2026 21:43 — with
GitHub Actions
Inactive
tguilarte
temporarily deployed
to
issue-triage
November 14, 2026 21:43 — with
GitHub Actions
Inactive
tguilarte
temporarily deployed
to
issue-triage
November 14, 2026 21:44 — with
GitHub Actions
Inactive
dave00000
temporarily deployed
to
issue-triage
November 14, 2026 22:04 — with
GitHub Actions
Inactive
dave00000
temporarily deployed
to
issue-triage
November 14, 2026 22:04 — with
GitHub Actions
Inactive
dave00000
temporarily deployed
to
issue-triage
November 14, 2026 22:04 — with
GitHub Actions
Inactive
dave00000
temporarily deployed
to
issue-triage
November 14, 2026 22:05 — with
GitHub Actions
Inactive
Hora-timer
temporarily deployed
to
issue-triage
November 14, 2026 22:07 — with
GitHub Actions
Inactive
Hora-timer
temporarily deployed
to
issue-triage
November 14, 2026 22:07 — with
GitHub Actions
Inactive
Hora-timer
temporarily deployed
to
issue-triage
November 14, 2026 22:07 — with
GitHub Actions
Inactive
Hora-timer
temporarily deployed
to
issue-triage
November 14, 2026 22:08 — with
GitHub Actions
Inactive
sergio-farfan
temporarily deployed
to
issue-triage
November 14, 2026 22:16 — with
GitHub Actions
Inactive
sergio-farfan
temporarily deployed
to
issue-triage
November 14, 2026 22:16 — with
GitHub Actions
Inactive
sergio-farfan
temporarily deployed
to
issue-triage
November 14, 2026 22:16 — with
GitHub Actions
Inactive
sergio-farfan
temporarily deployed
to
issue-triage
November 14, 2026 22:17 — with
GitHub Actions
Inactive
elan6666
temporarily deployed
to
issue-triage
November 14, 2026 22:27 — with
GitHub Actions
Inactive
elan6666
temporarily deployed
to
issue-triage
November 14, 2026 22:27 — with
GitHub Actions
Inactive
elan6666
temporarily deployed
to
issue-triage
November 14, 2026 22:27 — with
GitHub Actions
Inactive
elan6666
temporarily deployed
to
issue-triage
November 14, 2026 22:28 — with
GitHub Actions
Inactive
rrabeloparreira
temporarily deployed
to
issue-triage
November 14, 2026 22:39 — with
GitHub Actions
Inactive
rrabeloparreira
temporarily deployed
to
issue-triage
November 14, 2026 22:39 — with
GitHub Actions
Inactive
rrabeloparreira
temporarily deployed
to
issue-triage
November 14, 2026 22:39 — with
GitHub Actions
Inactive
rrabeloparreira
temporarily deployed
to
issue-triage
November 14, 2026 22:40 — with
GitHub Actions
Inactive
Haydden1
temporarily deployed
to
issue-triage
November 14, 2026 22:57 — with
GitHub Actions
Inactive
Haydden1
temporarily deployed
to
issue-triage
November 14, 2026 22:57 — with
GitHub Actions
Inactive
Haydden1
temporarily deployed
to
issue-triage
November 14, 2026 22:57 — with
GitHub Actions
Inactive
Haydden1
temporarily deployed
to
issue-triage
November 14, 2026 22:58 — with
GitHub Actions
Inactive
15969652028
temporarily deployed
to
issue-triage
November 14, 2026 23:07 — with
GitHub Actions
Inactive
15969652028
temporarily deployed
to
issue-triage
November 14, 2026 23:07 — with
GitHub Actions
Inactive
15969652028
temporarily deployed
to
issue-triage
November 14, 2026 23:07 — with
GitHub Actions
Inactive
15969652028
temporarily deployed
to
issue-triage
November 14, 2026 23:08 — with
GitHub Actions
Inactive
tiago156
temporarily deployed
to
issue-triage
November 14, 2026 23:15 — with
GitHub Actions
Inactive
tiago156
temporarily deployed
to
issue-triage
November 14, 2026 23:15 — with
GitHub Actions
Inactive
tiago156
temporarily deployed
to
issue-triage
November 14, 2026 23:15 — with
GitHub Actions
Inactive
tiago156
temporarily deployed
to
issue-triage
November 14, 2026 23:16 — with
GitHub Actions
Inactive
kozydogfather
temporarily deployed
to
issue-triage
November 14, 2026 23:41 — with
GitHub Actions
Inactive
kozydogfather
temporarily deployed
to
issue-triage
November 14, 2026 23:41 — with
GitHub Actions
Inactive
kozydogfather
temporarily deployed
to
issue-triage
November 14, 2026 23:41 — with
GitHub Actions
Inactive
kozydogfather
temporarily deployed
to
issue-triage
November 14, 2026 23:42 — with
GitHub Actions
Inactive
This branch was previously deployed
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Unify model request hook lifecycles across sampling and compaction
What changed
PreModelRequestandPostModelRequesthooks per sampling or compaction attempt, with distinct lifecycle IDs and cancellation reporting.thread_idandkindto hook inputs, distinguishingsampling,foreground_compaction, andbackground_compaction. Include the provider'sresponse_idin post-hook inputs when available.Testing
Add coverage for streaming and tool ordering, interrupted post-hooks, per-attempt metadata, and foreground and background compaction accounting and installation ordering.