Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

Commits on main

8f0466b
test(subagent): cover the spawn-tool refusal invariant\n\nRegistration behaviour had no test at all. `assemble_turn_harness` is\ndocumented as directly testable -- "the returned `AssembledTurnHarness`\nexposes the harness registries without driving a run" -- but had no\ncaller outside the module, so a log-only side effect on a wrong branch\nsat green indefinitely.\n\nDrive the real path instead of the private seam: `run_subagent_via_graph`\nwith `spawn_subagent` on the parent surface, once with the allowlist that\n`run_typed_mode` actually produces (spawn tool excluded) and once with a\nmisbuilt allowlist that readmits it. Both assert the tool never executes\n-- a probe tool records dispatch, so this proves unreachability, not mere\nabsence from the advertisement -- and they pin the log either silent or\nwarning exactly once.\n\nMutation-checked: restoring the unconditional `if spawn_stripped` fails\n`a_sub_agent_cannot_reach_a_spawn_tool_and_the_healthy_run_is_quiet` and\nnothing else, which is the discrimination the change is about.\n\nThe dynamic-strip tests cover the `delegate_name` override case\n(`plan`, `run_code`) that the registration-time backstop cannot see, and\na no-op case so the strip cannot silently narrow a normal tool surface.\n\nKnown gap, stated rather than papered over: nothing pins the *call* to\n`strip_spawn_tools_from_dynamic` in `run_typed_mode`. Reaching it\nend-to-end needs a tool inside `dynamic_tools` specifically (a Composio\nper-action tool or `extract_from_result`); the cheap `extra_tools` route\ngoes through the older strip instead, so it would not exercise the new\ncode.\n
Shanu committed 2 months ago
98c9259
fix(subagent): warn only when the allowlist readmitted a spawn tool\n\n`assemble_turn_harness` computed `spawn_stripped` and logged the refusal\nbefore consulting `admitted`, so it announced a refusal that was never in\ndoubt: `run_typed_mode` strips spawn/delegate tools out of\n`allowed_indices` first, and `allowed_names` is built from that stripped\nlist, so `spawn_stripped` was only ever true where `admitted` was already\nfalse. Every healthy sub-agent run therefore emitted one WRN per static\nspawn/delegate tool on the parent's surface, carrying no signal, while\nthe case the backstop exists for -- an allowlist that readmitted one --\nlooked identical in the log.\n\nGate the warn on `admitted`. No behavioural change: the tool was not\nregistered before and is not registered now. The already-excluded names\nare still visible at debug level via the existing\n"removed sub-agent spawn tools from sub-agent's tool surface" line in\n`run_typed_mode`, so nothing is lost by not re-logging them per tool.\n\nAlso correct `is_subagent_spawn_or_delegate_tool`'s doc comment, which\nclaimed to mirror `tool_prep::is_subagent_spawn_tool`. It does not: the\nprimary predicate resolves each archetype's `delegate_name` override\nthrough the registry (`plan`, `run_code`, `research`, ...), while this\ncopy matches only the `delegate_` prefix, so the backstop catches\nstrictly less than the thing it backstops. Say so, and say why widening\nit here is the caller's job rather than a registry lookup on the\nper-tool registration loop.\n
Shanu committed 2 months ago
8b366e9