refactor(gateway): split agent runtime helpers#106544
Merged
Merged
Conversation
steipete
force-pushed
the
codex/refactor-gateway-agent-runtime
branch
from
July 13, 2026 16:37
1d78e61 to
8b29a41
Compare
Contributor
Author
|
Land-ready verification:
Known proof gaps: none for this behavior-preserving internal split. |
Contributor
Author
|
Merged via squash.
|
wm0018
pushed a commit
to wm0018/openclaw
that referenced
this pull request
Jul 14, 2026
* refactor(gateway): split agent runtime helpers * fix(gateway): keep task status type internal
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 14, 2026
* refactor(gateway): split agent runtime helpers * fix(gateway): keep task status type internal
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.
Related: #106503
What Problem This Solves
The gateway agent method mixed session-reset delivery, task ownership, and terminal run dispatch into one 4,168-line method module, making independent lifecycle paths difficult to review.
Why This Change Was Made
Moves reset handling, task tracking, and run dispatch into focused modules while leaving request orchestration in the handler. The original module drops from 4,168 to 3,485 lines; every new production TypeScript file remains below 500 lines. Control flow and lifecycle semantics remain unchanged.
User Impact
No user-visible behavior change. Maintainers get smaller owner-aligned gateway lifecycle modules.
Evidence
tbx_01kxe3nn9k106ex7wr5g4vd4ftpnpm tsgo:corepnpm test src/gateway/server-methods/agent.test.ts— 237 tests passedpnpm exec oxfmt --checkon all four touched filesAI assistance used for refactoring and review.