Repository navigation
Implement native third-party agent dogfood path #58
Description
Current Status
Updated 2026-06-14 by Code.
The first external-command dogfood slice is merged to main via PR #82 (904228cfc50b99e4327284171820a0fdd412452b). This gives MultiAgent V2 a native role-scoped external_command backend proof path: spawn creates a synthetic registry-backed agent instead of an internal Codex thread, the backend receives a bounded one-shot JSON request over stdin, returns a bounded JSON response over stdout, and completion wakes the parent through the V2 mailbox/list/status path.
Delivered:
[agents.<role>].backendconfig/schema support fortype = "external_command", including command/timeout validation and generated schema updates.- Synthetic external-agent registry/status/cancel/list/close handling and V2 follow-up rejection.
- One-shot subprocess runner with timeout/cancel coverage across stdin/write/wait, bounded stdout/stderr reads, and stale-completion suppression after close.
- Focused config tests for load/default/invalid backend values and a V2 external-command round trip through the parent mailbox.
Validation before merge:
cargo fmt --all -- --checkpassed, with only the existing stable-rustfmt warning aboutimports_granularity.cargo test -p codex-core agent_role_external_command_backend_ --libpassed.cargo test -p codex-core multi_agent_v2_external_command_role_completes_through_parent_mailbox --libpassed.cargo check -p codex-core --testspassed.just write-config-schemawas run after schema source changes.- PR Add external command agent dogfood path #82 checks passed: codespell, cargo-deny, build-test, app build, and exec harness.
- Targeted read-only lifecycle/config review agents found issues that were patched before PR creation. Background auto-review had no active/current target findings at merge time.
Next action:
- Continue Implement native third-party agent dogfood path #58 with follow-up dogfood hardening only if needed after real use. Remaining intentionally out-of-scope areas are streaming, resume/full-history fork support, app-server runtime API, richer provider strategy, and broader UX polish; those should become separate plan/sub-issues rather than expanding the merged first slice.
Finish Line
Codex Lab has a native dogfood path for at least one third-party/external agent backend, with clear config, lifecycle, cancellation, output surfacing, and fallback behavior. This must not depend on the removed Ultracode plugin being installed.
Acceptance Criteria
- Decide whether Provider-agnostic worker decision spike #2 is superseded by this issue, remains the umbrella, or is split into implementation children.
- Wire a native external-agent dispatch point into the V2 multi-agent path without regressing internal agents.
- Define the request/response/lifecycle contract for external agent spawning, including role, initial context, cancellation, completion, failure, and output events.
- Add config for opting an agent role into the external path with self-describing fields rather than ambiguous booleans where possible.
- Implement or stub one concrete dogfood backend, preferably subprocess or app-server protocol based, and prove a full round-trip.
- Preserve sandbox/worktree safety and prevent orphaned external processes or stuck session registry state.
- Validate that existing internal multi-agent tests still pass and add integration coverage for external success, crash, cancellation, and config fallback.
Relationships
Child of #53. Related to #2 and #54. Blocks full dogfood MVP alongside native Auto Review.
Activity
shiny-code-bot commentedon Jun 14, 2026
#58 is complete via PR #82.
The finish line asked for a native dogfood path for at least one third-party/external agent backend with clear config, lifecycle, cancellation, output surfacing, and fallback behavior. PR #82 delivered that first path through the role-scoped
external_commandbackend, synthetic registry/status/cancel/list/close handling, bounded subprocess runner, config/schema support, and focused round-trip coverage.The remaining areas called out in the current status are intentionally outside this first slice: streaming, resume/full-history fork support, app-server runtime API, richer provider strategy, and broader UX polish. Those should be split into follow-up plan work only when dogfood use makes the next concrete slice clear. #2 remains open as the broader provider-agnostic worker strategy record.