Repository navigation
fix(plugins): inherit active config for embedded agent runs - #140435
Conversation
Capture one effective config for plugin admission and core execution. Calls that omit config now retain the active roster and model aliases. Preserve explicit configuration and the existing input and lifecycle ownership. Related: #130706. Verified with a failing regression, 49 focused tests, real scoped plugin API and synthetic HTTP controls, P2 review and the full changed gate.
|
🦞👀 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. |
|
Codex review: needs maintainer review before merge. Reviewed September 6, 2026, 4:46 PM ET / 20:46 UTC. ClawSweeper reviewWhat this changesPlugin-started agent turns now pass the same effective configuration to admission and execution, preserving configured agents and model aliases when callers omit config. Merge readiness✅ Ready for maintainer review This remains a useful, focused repair: current main and v2026.9.2 retain the config handoff gap. No introduced correctness defect was found, and the protected maintainer PR should proceed through normal review. Priority: P2 Review scores
Verification
How this fits togetherThe plugin runtime checks session ownership and hands plugin requests to OpenClaw's embedded agent runner. The runner uses configuration to resolve agents, models, and execution policy before returning results. flowchart LR
A[Plugin turn request] --> B[Session ownership checks]
B --> C[Explicit or active config]
C --> D[Run admission]
C --> E[Agent execution]
D --> E
E --> F[Result and admission cleanup]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +1, Tests +8. Total +9 across 2 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep configuration resolution at the plugin adapter and carry that same value through admission and execution while preserving explicit caller configuration. Do we have a high-confidence way to reproduce the issue? Yes, from source: a scoped plugin turn specifying a model alias but omitting config reaches core without the active configuration. The PR reports a failing-before HTTP reproduction; this review did not execute it. Is this the best way to solve the issue? Yes. Forwarding the config already selected by the adapter repairs the missing handoff without changing the public signature, adding configuration, or duplicating model resolution. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d97078731212. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
…ig-ref * origin/main: (31 commits) docs(web): split the Control UI page into task pages (#140437) fix: tool_search rejects calls that send both query and queries (#140310) fix(update): preserve rollback and truthful serving reports (#140419) fix: restore context when CLI recovery starts a fresh session (#140294) refactor(tests): retain transport-driven auth dismissal coverage (#140430) fix: stop unfinished subagents before resetting a conversation (#140417) fix(models): cap configured output at the final context window (#140436) refactor(mcp): reuse transport config normalization (#140439) test(gateway): preserve saved config in auth reload fixture (#140433) fix(plugins): inherit active config for embedded agent runs (#140435) refactor(tui): remove test-only shutdown timer hooks (#140432) fix(agents): preserve channel silent-reply guidance (#138345) fix(tasks): cancel resumed yielded subagent tasks (#140410) refactor(doctor): share compaction config traversal (#140330) fix(doctor): restore LINE and Mattermost account promotion (#136045) docs: remove the empty release-sections nav group (#140427) fix(tooling): omit Codex machine squash credit (#140420) chore(ui): refresh control ui locales (#140384) refactor(plugin-sdk): reuse native approval input contracts (#140415) fix: silent model WebSocket streams hang past the idle timeout (#140335) ... # Conflicts: # docs/web/control-ui.md
…#140435) Capture one effective config for plugin admission and core execution. Calls that omit config now retain the active roster and model aliases. Preserve explicit configuration and the existing input and lifecycle ownership. Related: openclaw#130706. Verified with a failing regression, 49 focused tests, real scoped plugin API and synthetic HTTP controls, P2 review and the full changed gate.
Related: #130706
What Problem This Solves
Fixes an issue where plugins starting an embedded agent without an explicit config could fail with a missing-agent-roster error despite a configured Gateway. Admission read the active config, but execution did not receive it.
Why This Change Was Made
Capture the effective config once and pass that same value to admission and execution. The existing registry boundary already captures route inputs before awaited ownership work; explicit config and run cleanup retain their current behavior.
User Impact
Plugin agent runs inherit the active agents and model aliases when config is omitted. This fixes an existing bug discovered while splitting #130706 into focused repairs.
Evidence
fasttofixture-modeland complete successfully. Caller-input mutation controls also passed.9a9b9232, all changed files and the patch remained byte-identical; 18 adapter tests and the real scoped API/input-mutation HTTP controls passed again.HTTP proof used isolated local state and a synthetic provider; no authenticated upstream inference is claimed.