Repository navigation
agentHost: let tests shorten the Codex turn snapshot wait - #343817
Merged
Logan Ramos (lramos15) merged 1 commit intoOct 29, 2026
Merged
Conversation
This was referenced Oct 23, 2026
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The change is narrowly scoped, preserves default behavior and test synchronization, and has no unresolved findings.
No open issues 🎉
What changed in this PR
This PR reduces Codex integration-test runtime by allowing tests to shorten the file-snapshot wait, while preserving the 30-second product default.
Changes:
- Adds an environment-variable override for the Codex turn snapshot wait.
- Applies a 1-second wait only to the two timeout scenarios, retaining their explicit pause/release synchronization.
- Leaves other tests on the default timeout, avoiding broader timing sensitivity.
| File | Description |
|---|---|
src/vs/platform/agentHost/test/node/providerIntegration/codexTurnDiff.integrationTest.ts |
Passes the shorter wait to the two timeout tests. |
src/vs/platform/agentHost/node/codex/codexAgent.ts |
Reads the override with a 30-second fallback. |
src/vs/platform/agentHost/common/agentService.ts |
Declares and documents the override environment variable. |
Review effort: Balanced
Ross Wollman (rwoll)
approved these changes
Oct 23, 2026
Logan Ramos (lramos15)
force-pushed
the
lramos15/codex-snapshot-wait-test-speed
branch
6 times, most recently
from
October 25, 2026 23:05
734bc33 to
b83c338
Compare
Two Codex turn diff integration tests keep a turn running past the 30s wait for its file snapshots, so each took about 62s and they added 2 min to every Electron integration test run in CI. A new VSCODE_AGENT_HOST_CODEX_TURN_EDITS_WAIT_MS override, like the existing session release retry override, lets these two tests use a 1s wait. Their turns stay paused until the test releases them, so they still outlast the wait. Locally they now take 6.4s and 2.2s. Co-authored-by: Copilot <[email protected]>
Logan Ramos (lramos15)
force-pushed
the
lramos15/codex-snapshot-wait-test-speed
branch
from
October 26, 2026 11:36
b83c338 to
29ce778
Compare
Logan Ramos (lramos15)
marked this pull request as ready for review
October 29, 2026 13:59
Logan Ramos (lramos15)
deleted the
lramos15/codex-snapshot-wait-test-speed
branch
October 29, 2026 13:59
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.
Two tests in
codexTurnDiff.integrationTest.tsdeliberately keep a Codex turn running past the 30 s wait for its file snapshots (waitForTurnEditsincodexAgent.ts), so each took about 62 s:a turn observed while it runs past the snapshot wait keeps its editsa steered native turn running past the snapshot wait keeps both host turns' editsTogether they added about 2 min to every
<OS> (run) / Electronjob. That file was the slowest node.js integration test file, at 2.5–3.4 min.The wait can now be overridden with
VSCODE_AGENT_HOST_CODEX_TURN_EDITS_WAIT_MS, like the existingVSCODE_AGENT_HOST_SESSION_RELEASE_RETRY_MSintegration test override, and those two tests use 1 s. Their turns stay paused until the test releases them, so they still outlast the wait. The other tests in the file keep the 30 s default, so they don't become timing-sensitive. The product default is unchanged.Saves: about 1.9 min of runner time per Electron integration job, on every OS (about 6–7 runner-minutes per PR run). With the CI split PRs (#343812 to #343816) merged, this is no longer on the slowest path, so it mostly saves compute.
Validation
./scripts/test-integration.sh --run src/vs/platform/agentHost/test/node/providerIntegration/codexTurnDiff.integrationTest.ts --grep "snapshot wait": 2 passing, in 6.4 s and 2.2 s (about 62 s each in CI)../scripts/test-integration.sh --run src/vs/platform/agentHost/test/node/providerIntegration/codexTurnDiff.integrationTest.ts: 21 passing in 40 s.npm run eslint -- src/vs/platform/agentHost/common/agentService.ts src/vs/platform/agentHost/node/codex/codexAgent.ts src/vs/platform/agentHost/test/node/providerIntegration/codexTurnDiff.integrationTest.ts: clean.