Skip to content

fix(plugins): inherit active config for embedded agent runs - #140435

Merged
steipete merged 1 commit into
mainfrom
codex/130706-plugin-embedded-config-20260906
Sep 6, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/130706-plugin-embedded-config-20260906

Conversation

@steipete

@steipete steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

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

  • Regression failed before the repair; 49 focused runtime, adapter and registry tests passed afterward.
  • Real scoped plugin API plus a synthetic HTTP provider: omitted config failed before; omitted and explicit config now resolve fast to fixture-model and complete successfully. Caller-input mutation controls also passed.
  • After a clean rebase onto 9a9b9232, all changed files and the patch remained byte-identical; 18 adapter tests and the real scoped API/input-mutation HTTP controls passed again.
  • Independent P2 review: scoped-clean, zero findings. Full changed-code gate passed, including types, lint and architecture checks.
  • Production: +3/-2, net +1. Tests: net +8. The added binding keeps both existing owners on one config snapshot.

HTTP proof used isolated local state and a synthetic provider; no authenticated upstream inference is claimed.

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.
@steipete steipete self-assigned this Sep 6, 2026
@clawsweeper

clawsweeper Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Sep 6, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 6, 2026
@clawsweeper

clawsweeper Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 6, 2026, 4:46 PM ET / 20:46 UTC.

ClawSweeper review

What this changes

Plugin-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
Reviewed head: 11ae85590f443c81cca28fc7f1f6ec6a24ff6c16

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A narrow owner-boundary repair with relevant regression coverage, reported HTTP validation, and no blocking findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied MEMBER classification exempts this PR from the external-contributor proof gate; its body additionally reports scoped plugin API execution against a synthetic HTTP provider with successful inherited and explicit config cases.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied MEMBER classification exempts this PR from the external-contributor proof gate; its body additionally reports scoped plugin API execution against a synthetic HTTP provider with successful inherited and explicit config cases.
Evidence reviewed 8 items Introduced repair: The pinned introduced diff captures effective config once and forwards it to core execution; plugin scope checks, rejection of host-private authority fields, and admission cleanup are unchanged.
Still necessary on current main: Fetched main resolves active config for admission but calls core with the original params, leaving execution config undefined when omitted.
Latest release retains the gap: The same admission-only config fallback exists in the supplied latest release, v2026.9.2.
Findings None None.
Security None None.

How this fits together

The 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]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +1, Tests +8. Total +9 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 3 2 +1
Tests 1 34 26 +8
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 37 28 +9

Review metrics

None.

Technical review

Best 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.

Labels

Label changes:

  • add P2: This repairs a bounded plugin agent execution failure when configuration is omitted, without evidence of a widespread urgent outage.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The supplied MEMBER classification exempts this PR from the external-contributor proof gate; its body additionally reports scoped plugin API execution against a synthetic HTTP provider with successful inherited and explicit config cases.

Label justifications:

  • P2: This repairs a bounded plugin agent execution failure when configuration is omitted, without evidence of a widespread urgent outage.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The supplied MEMBER classification exempts this PR from the external-contributor proof gate; its body additionally reports scoped plugin API execution against a synthetic HTTP provider with successful inherited and explicit config cases.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Josh Avant: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit 5dfa466 into main Sep 6, 2026
183 checks passed
@steipete
steipete deleted the codex/130706-plugin-embedded-config-20260906 branch September 6, 2026 20:56
@steipete

steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 6, 2026
…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
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 7, 2026
…#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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant