Skip to content

New detector: unbounded tool fan-out / parallel-call explosion #7

Description

@bamdadd

Context

The reliability detectors catch repeated identical calls (loops) and error-heavy retry bursts (retry-storm), but not unbounded tool fan-out — a single agent/chain span spawning an excessive number of tool children (parallel-call explosion), which signals a runaway plan and burns budget. Trace.children() already gives the parent→child structure needed.

Needs design (threshold, whether it counts direct children vs. subtree, per-tool vs. total), so help wanted.

What to do

Add a tool-fan-out detector that emits a warn (or error) finding when a single parent span has more than a configurable N direct tool children (default e.g. 20). Use Trace.children(); keep it pure/deterministic; emit the parent span id plus a deterministic count in the message. Register in ALL, seed a fixture, add a test.

Acceptance criteria

  • New detector registered in ALL, follows the Detector Protocol, threshold is configurable via its constructor (mirroring BudgetOverrunDetector).
  • Fires on a seeded wide-fan-out trace; does not fire on existing clean fixtures.
  • Deterministic; documented in the README detector table.

Pointers

  • src/taintline/model.py:52-55Trace.children()
  • src/taintline/detectors/reliability.py:231-263BudgetOverrunDetector, the pattern for a configurable-threshold detector
  • src/taintline/detectors/__init__.py:21-29 — register in ALL
  • README detector table — add a row

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions