Repository navigation
test(codex): pin agents.enabled false after sessions_spawn became the only subagent surface - #207595
Merged
Merged
Conversation
… only subagent surface - The admin/status-only denial case required agents.enabled to be unset; #207303 disables native delegation on every Codex thread, so require false. - Update the effective-policy comment to match.
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Nov 29, 2026
… only subagent surface (openclaw#207595) ## What Problem This Solves `src/agents/harness/codex-subagent-tool-policy.test.ts` fails on main: `Codex subagent native tool policy > preserves native tools for OpenClaw admin/status-only denial` gets an `AssertionError` (`agents.enabled` is `false`, the test requires `undefined`). It fails in every scheduled run since openclaw#207303, for example job `checks-node-compact-large-31` in run 46154601106 (https://github.com/openclaw/openclaw/actions/runs/46154601106). The test is stale. openclaw#207303 intentionally made every Codex thread set `agents.enabled`, `features.multi_agent` and `features.multi_agent_v2` to false (`extensions/codex/src/app-server/thread-requests.ts:328`, spread of `CODEX_DELEGATION_DISABLED_THREAD_CONFIG` in `buildCodexRuntimeThreadConfig`). Before it, the value was set only when a deny hit native delegation, so an admin/status-only deny left it unset. Bisect: the parent of openclaw#207303 passes this file 17/17; openclaw#207303 fails exactly this case. ## Fix - Line 153: assert `agents.enabled` is `false`, which pins openclaw#207303's invariant instead of removing the check. - The comment in `preserves the effective policy for $name` said session denies are enforced by disabling native delegation. Delegation is now off on every thread; the comment says so. Test-only. No production change. ## User Impact None at runtime. Main's `checks-node-compact-large-31` goes green for this file. ## Evidence - Red on main c8c5eec: `codex-subagent-tool-policy.test.ts` fails 1 case (the one above). - Green on this head: that file (17/17) plus the tests of `thread-requests.ts` consumers (thread-delegation, thread-lifecycle, thread-policy, thread-requests.managed-requirements, turn-params, run-attempt-tools and 9 more): 16 files, 337 tests pass. - Format and oxlint clean on the changed file. Diff: +5 / -4, one test file. Co-authored-by: Ayaan Zaidi <[email protected]>
tideclaw-bot
pushed a commit
that referenced
this pull request
Nov 29, 2026
…e database (#207535) Reopen the captured Doctor writer after successful state schema preparation. Later auth repairs can reuse it even after the config worker opens its own connection. (cherry picked from commit 3e55ac1) Companion disposition: #207585 is a later main update-process refactor, not needed by the retained Doctor flow; #207595 is a Codex fixture change. Co-authored-by: RomneyDa <[email protected]>
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.
What Problem This Solves
src/agents/harness/codex-subagent-tool-policy.test.tsfails on main:Codex subagent native tool policy > preserves native tools for OpenClaw admin/status-only denialgets anAssertionError(agents.enabledisfalse, the test requiresundefined). It fails in every scheduled run since #207303, for example jobchecks-node-compact-large-31in run 46154601106 (https://github.com/openclaw/openclaw/actions/runs/46154601106).The test is stale. #207303 intentionally made every Codex thread set
agents.enabled,features.multi_agentandfeatures.multi_agent_v2to false (extensions/codex/src/app-server/thread-requests.ts:328, spread ofCODEX_DELEGATION_DISABLED_THREAD_CONFIGinbuildCodexRuntimeThreadConfig). Before it, the value was set only when a deny hit native delegation, so an admin/status-only deny left it unset.Bisect: the parent of #207303 passes this file 17/17; #207303 fails exactly this case.
Fix
agents.enabledisfalse, which pins fix(codex): use sessions_spawn as the only subagent surface #207303's invariant instead of removing the check.preserves the effective policy for $namesaid session denies are enforced by disabling native delegation. Delegation is now off on every thread; the comment says so.Test-only. No production change.
User Impact
None at runtime. Main's
checks-node-compact-large-31goes green for this file.Evidence
codex-subagent-tool-policy.test.tsfails 1 case (the one above).thread-requests.tsconsumers (thread-delegation, thread-lifecycle, thread-policy, thread-requests.managed-requirements, turn-params, run-attempt-tools and 9 more): 16 files, 337 tests pass.