find_missed_spawns
Identify assistant responses with multiple actionable items that were answered linearly instead of being delegated as independent tasks, enabling calibration of spawn hint thresholds.
Instructions
Find assistant responses that decomposed into independent blocks but were answered linearly (no spawn() call nearby).
Algorithm:
Pull recent assistant messages (last
window_daysdays, length ≥min_response_len, excluding subagent jsonls).For each, count top-level numbered items and H2/H3 headers.
Mark as
decomposableif numbered ≥min_numberedOR headers ≥min_headers.For each decomposable response, check whether any tasks row with parent_cid = response's session_id has started_at within ±10 min of the response. If none → missed_spawn.
Return top
top_nby score (numbered + headers).
Use this to calibrate the spawn_hint: a high missed-spawn count means the hint isn't strong enough, or thresholds need tuning.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| window_days | No | ||
| min_response_len | No | ||
| min_numbered | No | ||
| min_headers | No | ||
| top_n | No | ||
| max_messages | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |