Skip to content

feat(ox-core): add unified Agent SpawnSpec and invoke_subagent tool - #983

Merged
hakula139 merged 3 commits into
mainfrom
feat/unified-subagent
Dec 1, 2026
Merged

hakula139 merged 3 commits into
mainfrom
feat/unified-subagent

Conversation

@hakula139

Copy link
Copy Markdown
Member

Summary

  • Add ox_core::subagent implementing the unified Agent + SpawnSpec delegation model (SpawnContext, SpawnLifecycle, SpawnSpec, SpawnResult, SpawnError, AgentSpawner, and spawn_agent).
  • Enforce max_depth recursion limits (automatically incrementing depth when re-registering invoke_subagent in child registries) and filter child tools by allowed_tools.
  • Add InvokeSubagentTool (invoke_subagent) implementing Tool so any Agent can delegate self-contained tasks through the same pipeline.
  • Document SpawnSpec, depth enforcement, and invoke_subagent in docs/reference/subagents.md and link it from docs/README.md.

Test plan

  • nix develop -c run-hooks passed (clippy, cspell, dprint, markdownlint-cli2, rustfmt).
  • nix develop -c cargo doc --no-deps passed with zero warnings.
  • nix develop -c cargo llvm-cov --workspace --show-missing-lines passed: crates/ox-core/src/subagent.rs at 98.88% line coverage (98.78% regions, 97.30% functions).

Related

@hakula139 hakula139 added this to the v0.2.0 milestone Dec 1, 2026
@hakula139 hakula139 added enhancement New capability area: engine Touches the engine, its protocol, or the drivers that run it labels Dec 1, 2026
@hakula139 hakula139 self-assigned this Dec 1, 2026
hakula139 added a commit that referenced this pull request Dec 1, 2026
@hakula139
hakula139 force-pushed the feat/unified-subagent branch from 9579a7e to 757981a Compare December 1, 2026 11:32
@codecov

codecov Bot commented Dec 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.72123% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/ox-core/src/subagent.rs 98.72% 5 Missing ⚠️

📢 Thoughts on this report? Let us know!

@hakula139
hakula139 merged commit 01d3817 into main Dec 1, 2026
7 checks passed
@hakula139
hakula139 deleted the feat/unified-subagent branch December 1, 2026 11:36
@github-project-automation github-project-automation Bot moved this from Todo to Done in Oxide Code Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: engine Touches the engine, its protocol, or the drivers that run it enhancement New capability

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Delegate self-contained tasks to subagents

1 participant