Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
bacbded to
4f87510
Compare
|
Codex review: needs real behavior proof before merge. Reviewed September 3, 2026, 3:07 AM ET / 07:07 UTC. ClawSweeper reviewWhat this changesAdds Merge readiness⛔ Blocked before merge - 4 items remain This PR remains necessary: current main still lacks an Priority: P2 Review scores
Verification
How this fits together
flowchart LR
A[CLI invocation] --> B[Parse agent and workspace options]
B --> C[Resolve configured agent]
C --> D[Prepare isolated run configuration]
D --> E[Scope selected agent credentials]
E --> F[Run embedded agent]
F --> G[CLI result and cleanup]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +43, Tests +313, Docs +2, Other 0. Total +358 across 9 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Rebase the explicit-selection wiring onto current main’s split agent-exec architecture, preserve its auth/state ownership behavior, and attach redacted terminal output from a successful configured-Codex OAuth Do we have a high-confidence way to reproduce the issue? Yes, by source inspection: current main neither parses a nested Is this the best way to solve the issue? Yes in principle: it reuses the existing configured-agent resolver and validates both parent and leaf option positions. It must first be rebased so the same solution preserves current-main auth and temporary-state semantics. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b55b7256cc0d. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (10 earlier review cycles; latest 8 shown)
|
4f87510 to
4c94f7b
Compare
|
Added completed selected-agent behavior proof in The new E2E starts a real child CLI process with an installed proof harness, two explicit agents, no system owner, {
"ok": true,
"status": "ok",
"final": "SELECTED_AGENT_OK agent=beta workspace=<tmp>/workspaces/override",
"model": "proof-model",
"provider": "exec-proof",
"sessionId": "exec-proof-session"
}The harness emits its actual Direct Codex source verification was performed against Validation after the update: selected-agent E2E passed, 95 focused unit/integration tests passed, core typecheck passed, and focused format/lint passed. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
4c94f7b to
84d1f3d
Compare
|
Addressed the list-roster isolation finding in
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Closing this aging proposal as part of contribution backlog cleanup. Current-main agent exec integration and successful native configured-agent authentication proof remain outstanding. I am withdrawing the stale implementation rather than continuing to keep the conflicted branch open. This closure does not claim the requested capability is already available. |
Closes #124768
What Problem This Solves
openclaw agent execcould not target an agent in an explicit multi-agent fleet. The parentagentcommand accepted--agent, but the nestedexeccommand neither declared the option nor inherited it. Without a generic owner, the run failed before it could reach that agent's configured workspace, runtime, or stored OAuth profiles.Why This Change Was Made
This adds
--agent <id>to the nested command and uses the existing roster normalization and validation path. An explicit selection now wins over legacy and system-owner compatibility defaults, scopes stored auth to the selected agent directory, and uses that agent's configured workspace unless--cwdexplicitly overrides it. Temporary session and database state remain isolated exactly as before.Current main already includes #124697, which aligned the implicit exec owner with
agents.defaults.systemAgent. This PR builds on that owner seam and adds the missing explicit selection contract for fleets that intentionally have no generic default.I also checked Codex's source contract directly:
CODEX_HOMEowns the Codex config directory, and its credential file is$CODEX_HOME/auth.json. Selecting the OpenClaw agent before entering the harness/auth boundary is therefore required for deterministic credential ownership.User Impact
Operators can now run either form:
The selected agent contributes its runtime, stored credentials, and default workspace. Existing invocations without
--agentretain their current process-working-directory and owner-resolution behavior, and--cwdremains the final workspace override.Evidence
Regression reproduced before the implementation: the parent-position
--agent opsparsed successfully but was absent from the options passed toagentExecCommand.node scripts/run-vitest.mjs src/cli/program/register.agent.test.ts src/commands/agent-exec.test.ts src/commands/agent-exec.agent-owner.test.ts src/agents/agent-scope-config.test.ts(95 tests passed).pnpm docs:check-mdx(774 files passed).Focused
oxfmt --checkandoxlintpassed for all touched files.pnpm checkcompleted every preflight guard, all 94 package-lock validations, and core/UI/extensions/scripts/test typechecks. The unrelated full-repository core lint shard was manually stopped after 180 seconds with no diagnostics; focused lint passed.Source-built
openclaw agent exec --helpdisplays the new option and example.Commit
4c94f7bbf5adds a real child-process E2E with an installed proof harness, two explicit agents, no system owner,--agent beta, and an explicit--cwdoverride. The focused E2E passed and captured this redacted child stdout:{ "ok": true, "status": "ok", "final": "SELECTED_AGENT_OK agent=beta workspace=<tmp>/workspaces/override", "model": "proof-model", "provider": "exec-proof", "sessionId": "exec-proof-session" }A live source CLI smoke with an explicit two-agent config and no system owner selected
beta, passed owner/auth admission without the reported 401, and entered the native Codex app-server path. The app-server did not return a final response within the 120-second smoke window, so this is recorded as boundary evidence rather than a successful model E2E.