GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — fix(server): Codex runs sharing a session no longer fall behind together by navidnadali · Pull Request #39136 · pingdotgg/t3code Conversation
Contributor
Note Written by Claude Opus 5.5 on behalf of Navid ProblemCodex runs every thread of a provider instance on one provider session, so every live Codex run receives every thread's Change
ScopeFixes #39135. Verification
Not checked: a live Codex session; the model stands in for the writer load. Made with Claude Opus 5.5 via Claude Code. Reviewed by GPT-6.1 Sol via Codex. 🤖 Generated with Claude Code
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsCodex runs every thread of an instance on one provider session, so each run receives every thread's events. A run dropped another thread's events only when it processed them: their snapshots were queued as commit jobs and their usage reports waited for those commits, so with several runs live each one waited for every thread's commits and all fell behind. A run now routes its events as they arrive and drops, before the commit queue, the ones it would reject without a routing change. Past the root turn every event still reaches the run. Co-Authored-By: Claude Opus 5.5 <[email protected]> …tes-before-commit Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
There was an error while loading. Please reload this page.
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes.
|
| Layer / File(s) | Summary |
|---|---|
Route events before commit queuing apps/server/src/orchestration-v2/RunExecutionService.ts |
Before the root turn ends, the stream filters events that are neither accepted nor routing-state updates. After it ends, the stream passes all events downstream. |
Test shared-session ingestion under contention apps/server/src/orchestration-v2/RunExecutionService.test.ts |
The background scenario can use a supplied shared commit coordinator. A new test runs nine consumers with ten competing writers and asserts that maximum ingestion lag stays within two rounds after five simulated minutes. |
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix · Severity of issue fixed: Medium
Suggested reviewers: shivamhwp, juliusmarminge, t3dotgg
ef47dThis change stops runs that share a provider session from queuing work for events they will reject, so they no longer fall behind together under writer load. The supplied evidence shows no concrete regression, and the new test covers the contention scenario. Merge risk is low.
Explanation
The title names the main change: Codex runs that share a provider session no longer fall behind together. It uses a conventional commit prefix and is specific. The changeset routes provider events ahead of the commit queue and drops rejected events, which addresses the lag described in the title.
Explanation
The description follows the template. It has Problem, Change, Scope, and Verification sections. The Problem and Change sections explain the lag cause and the routing fix. Scope links #39135. Verification gives focused test commands, a benchmark table, and the full suite results, and it states what was not checked, a live Codex session. The author also notes the model used, as the template asks. The Scope section links the issue but does not explain a reason for a bug fix that lacks an issue, which is not needed because an issue exists. The description is thorough and complete.
Explanation
Directly linked issue #39135 asks that runs sharing a provider session drop other threads' events without waiting on the shared writer. The PR summary says routedAhead in RunExecutionService.ts applies routeProviderEvent before the commit queue and drops events that routing rejects without changing routing state. Before the root turn ends, rejected events write nothing. After the root turn ends, all events still pass through, so background-work checks continue. The reviewed head confirms that routeProviderEvent is a pure function over ProviderEventRoutingState that returns [boolean, state], which supports the claim that the pre-queue check matches the in-run check. The test keeps every run on a shared provider session in RunExecutionService.test.ts models nine runs on one shared ProviderCommitBatch with a busy writer and asserts at most two rounds of lag after five minutes. The PR reports that this test fails on main (6 rounds behind) and passes with the change. The issue's Codex-only framing is broader in the code: the fix sits in the generic routing path, so it covers any provider with supportsMultipleProviderThreadsPerSession. No acceptance criteria beyond the reported behavior are specified. Limits: the diff hunks for RunExecutionService.ts could not be read (the diff tool reported missing blobs, and the full-file read was truncated), so the routedAhead logic rests on the PR summary and the test description. Test results are author-reported and were not re-run.
Explanation
The changes touch two files: RunExecutionService.ts (about +11 lines, the pre-queue routing step) and RunExecutionService.test.ts (about +95/-2, the shared-coordinator test support and the new regression test). Both serve the objective in #39135: the source change implements the routing, and the test checks the lag behavior. The test support adds Effect Context and Semaphore imports, which the new test needs. No unrelated files or API declarations change (the summary reports no changes to exported declarations). The PR description's verification runs (check:changed, the orchestration-v2 and integration suites) are validation of this change, not separate scope. Limit: the exact RunExecutionService.ts hunks could not be read, so this verdict relies on the change summary.
d9ee3181-12f4-4550-969f-7062447abf95apps/server/src/orchestration-v2/RunExecutionService.test.tsapps/server/src/orchestration-v2/RunExecutionService.tsIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
The automated pipeline stopped on this pull request and will not merge it: the capture step could not show the problem on the base commit, so there is nothing to prove fixed. Read the scenario guidance, which excludes timing and provider-specific performance proof. Started the head app and completed a real Codex turn. Requested eight concurrent native children from one parent. Only three launched. Configured provider launch arguments with agents.max_threads=12 and repeated; Codex again reported three successful launches and five errors: collab spawn failed: agent thread limit reached. Uploaded the scripted diagnostic. Stopped the server and removed the worktree and scratch files. The base app was not run. It stays open for a person to finish or close. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Note Written by Claude Opus 5.5 on behalf of Navid We ran this shape live with Codex: twelve T3 threads on one Codex provider instance (so one shared provider
So this live run does not reproduce the lag on |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
[Bug]: Codex runs that share a provider session fall behind together while the writer is busy
There was an error while loading. Please reload this page.