Three issues raised in review on #1217, all real:
- The STRIX_MAX_AGENTS check read agent_count() and then spawned, so two
parents racing for the last slot both passed before either child
registered and the graph overshot the cap. The coordinator now hands out
slots atomically (try_reserve_agent_slot / release_agent_slot), counting
outstanding reservations alongside live agents under the same lock. The
slot is released once the spawner has registered the child or failed.
Depth stays a plain check — a parent's depth cannot change mid-spawn.
- _trim_parent_history kept the newest item whole when that item alone
exceeded the budget ("and kept"), so the cap bounded nothing on the
child's first request and could overflow the provider context window. An
oversized newest item is now rendered as a truncated text message. No
tool-call pairing can break: nothing else survives that trim.
- --reasoning-effort exported STRIX_REASONING_EFFORT, which persist_current()
then wrote into cli-config.json, turning a documented per-run flag into
the default for every later run. Env vars can now be marked run-scoped and
are skipped when persisting.
Tests cover the concurrent reservation, slot release, the oversized-item
trim, and the persist exemption.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Autonomous scans can spawn unbounded agents, each re-paying the full
system prompt on every turn and (by default) inheriting a full copy of
the parent's history — a large token-cost driver on a single target.
This adds knobs to bound it, all OFF by default so out-of-the-box
behavior is unchanged.
New (opt-in via env, default 0 = disabled):
- STRIX_MAX_AGENTS — cap total agents in the graph; create_agent refuses
past the cap with a model-facing message to reuse/wait/self-serve.
- STRIX_MAX_AGENT_DEPTH — cap spawn depth (root = 1).
- STRIX_INHERIT_CONTEXT_MAX_TOKENS — trim inherited parent history to the
most-recent tail within a token budget.
Also:
- New --reasoning-effort CLI flag (overrides STRIX_REASONING_EFFORT per
run); pure addition, no default change.
Coordinator gains agent_count()/depth_of() helpers. Tests cover the caps
and the history trim. Docs updated. No default behavior changes.
feat(inputs): implement logic for required tool choice based on model
test(inputs): add tests for force_required_tool_choice behavior
test(runner): update tests to include force_required_tool_choice in settings