codex: support native app-server background spawns for Codex harness agents#74768
codex: support native app-server background spawns for Codex harness agents#7476891wan wants to merge 2 commits intoopenclaw:mainfrom
Conversation
|
Codex review: needs maintainer review before merge. Summary Reproducibility: yes. Current main has a source-level reproduction: a config with only Next step before merge Security Review detailsBest possible solution: Land the resolver-level compatibility after ordinary review and CI, preserving explicit Do we have a high-confidence way to reproduce the issue? Yes. Current main has a source-level reproduction: a config with only Is this the best way to solve the issue? Yes. The resolver-level fill-missing merge is the narrowest maintainable fix because it mirrors the existing doctor migration and avoids scattering Codex-specific compatibility logic across harness selection, startup planning, and runtime metadata call sites. What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 8283c5d6cc3f. |
7c83e36 to
d162898
Compare
7e5000e to
1876af7
Compare
|
Closing as superseded by current upstream. Latest main/release already includes Codex app-server/harness runtime support, and this branch now only preserves a legacy embeddedHarness compatibility slice while conflicting with current main. I am retiring it to reduce stale PR noise. |
Why
Codex app-server is the native Codex integration path; ACP/acpx remains the generic harness backend.
What
embeddedHarness: { runtime: "codex", fallback: "none" }config shape to participate in agent runtime policy resolution whenagentRuntimeis not present.sessions_spawn({ agentId: "codex", task: "..." })on the normal OpenClaw child-session path, while the child agent can select the existing native Codex app-server harness through runtime policy.embeddedHarnessforces the Codex runtime.agentRuntimeprecedence and only uses legacyembeddedHarnessto fill missing runtime/fallback policy fields.What not
Tests
pnpm exec oxfmt --check --threads=1 src/agents/agent-runtime-policy.ts src/agents/harness/selection.test.ts src/plugins/channel-plugin-ids.test.ts src/agents/tools/sessions-spawn-tool.test.ts- PASS.pnpm test src/agents/harness/selection.test.ts src/plugins/channel-plugin-ids.test.ts src/agents/tools/sessions-spawn-tool.test.ts -- --reporter=verbose- PASS, 2 Vitest shards, 50 agent tests and 68 plugin tests.pnpm test extensions/codex/src/app-server/run-attempt.test.ts src/agents/acp-spawn.test.ts src/agents/openclaw-tools.subagents.sessions-spawn.lifecycle.test.ts -- --reporter=verbose- PASS, 2 Vitest shards, 63 agent tests and 39 extension tests.git diff --check- PASS.CI=true OPENCLAW_LOCAL_CHECK=0 pnpm check:changed- PASS.Note: broad changed-gate proof ran locally because the
blacksmithTestbox CLI was unavailable in this checkout.