Repository navigation
refactor(agents): move implicit-main fallback into load-time roster injection - #112678
Merged
Merged
Conversation
steipete
marked this pull request as ready for review
July 22, 2026 14:12
steipete
force-pushed
the
claude/roster-only-agents
branch
from
July 23, 2026 04:10
94e3495 to
969fbae
Compare
steipete
force-pushed
the
claude/roster-only-agents
branch
4 times, most recently
from
July 23, 2026 12:41
694fc47 to
c14e1d4
Compare
steipete
force-pushed
the
claude/roster-only-agents
branch
2 times, most recently
from
July 23, 2026 17:13
f3eee2a to
25b3b1e
Compare
Contributor
Dependency graph guard clearedThis PR no longer has blocked dependency graph changes. A future dependency graph change requires a fresh
|
steipete
force-pushed
the
claude/roster-only-agents
branch
from
July 23, 2026 18:25
25b3b1e to
2c517cf
Compare
This was referenced Jul 25, 2026
Merged
This was referenced Aug 28, 2026
This was referenced Oct 8, 2026
This was referenced Oct 12, 2026
This was referenced Oct 24, 2026
This was referenced Nov 22, 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
OpenClaw implicitly assumed a
mainagent in roughly 38 runtime sites, so the configured roster was not the single source of truth. That scattered fallback made the default-agent boundary hard to reason about and blocked clean groundwork for named agents.Why This Change Was Made
A single load-time injection now materializes
{ id: "main", default: true }for pre-roster configurations. The injection is in memory only: read-only commands do not rewrite the config, and JSON5 comments, includes, and environment references remain untouched. Roster validation requires exactly one explicit default.The parse layer returns an absent agent instead of silently choosing
main, and routing boundaries inject the configured default where ownership is known.LEGACY_IMPLICIT_AGENT_IDnames the historical fallback; the publicDEFAULT_AGENT_IDexport remains as a deprecated alias because module/routing is an SDK surface.openclaw doctor --fixowns authored-layer roster persistence, including include-provenance handling. Default deletion protection is dynamic.mainremains undeletable whileagents/main/agentcontinues to serve as the shared legacy auth store.User Impact
Behavior is identical for every shipped installation, with zero operator action required. Existing pre-roster installs continue to run as
main, while the runtime now has a single authoritative roster/default boundary that provides groundwork for named agents.The deferred follow-up for named first agents, literal-
mainunreserving, and legacy session-key migration remains onh2-named-agents-archive.Evidence
origin/mainand no unresolved-claim producer survives in this branch.node scripts/check-changed.mjspassed on Blacksmith Testbox immediately before the final conflict-free two-commit freshness rebase, including formatting, API/boundary guards, core and core-test typechecks, full core lint, database-first guards, and import-cycle checks: https://github.com/openclaw/openclaw/actions/runs/29925729176${ENV}and$includepreservation and include-owned roster provenance are covered by focused config/setup/Doctor tests.92d208608160be6873a6e88225d412827a7d706f: https://github.com/openclaw/openclaw/actions/runs/30145438053origin/main.ClawSweeper Rank-up Moves
h2-named-agents-archive.