Repository navigation
refactor(agents): split code mode execution - #113669
Merged
Merged
Conversation
steipete
marked this pull request as ready for review
July 25, 2026 12:55
steipete
force-pushed
the
codex/r2-codemode
branch
from
July 25, 2026 13:17
2363cdb to
accdbe7
Compare
Contributor
Author
|
Land-ready proof for the rebased head
ClawSweeper congested-publisher exception: the latest exact-head ClawSweeper comment is still only the generated “review started” placeholder and contains no review or Testbox |
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 26, 2026
* refactor(agents): split code mode execution * refactor(agents): keep code mode bridge type private
This was referenced Aug 23, 2026
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/code-mode.tshad grown to 2,373 lines and remained grandfathered in the max-lines baseline. Its configuration, source preparation, worker transport, bridge dispatch, headless orchestration, suspended-run lifecycle, interactive execution, and public catalog facade shared one file, making ownership and review unnecessarily broad.Why This Change Was Made
This AI-assisted, maintainer-commissioned refactor mechanically separates those responsibilities into cohesive modules while preserving the existing
code-mode.tspublic surface and test-only hook. It stays consistent with the child-program boundary extracted in #113237 and does not change config, protocol, runtime behavior, lazy imports, or tests.User Impact
No user-visible behavior changes. Maintainers get smaller ownership boundaries: the public facade is 334 lines and every extracted production module is between 164 and 499 lines, so
src/agents/code-mode.tscan leave the max-lines baseline.Evidence
+2221/-2077; tests+0/-0; config/baseline+0/-1; repository net+143. The added production lines are module import/export boundaries; execution logic and comments are preserved.node scripts/run-vitest.mjs src/agents/code-mode.test.ts src/agents/code-mode-headless.test.ts src/agents/code-mode-swarm.test.ts src/agents/agent-tools.before-tool-call.integration.e2e.test.ts— remote Testbox equivalent passed 119 tests across 4 files / 2 shards.CI=1 OPENCLAW_TESTBOX=1 OPENCLAW_TESTBOX_REMOTE_RUN=1 pnpm build— passed; no[INEFFECTIVE_DYNAMIC_IMPORT]warning.OPENCLAW_CHECK_CHANGED_REMOTE_CHILD=1 OPENCLAW_CHANGED_LANES_RAW_SYNC=1 CI=1 corepack pnpm check:changed— passed, including max-lines ratchet, core and test typechecks, core/script lint, and 0 runtime import cycles.tbx_01kycm0azbhc1ybpfb7t357fhv; hydration run https://github.com/openclaw/openclaw/actions/runs/30158056901.agents/skills/autoreview/scripts/autoreview --mode uncommitted— clean, no accepted/actionable findings.git diff --check— passed.