Files
command-center/agent/managed-skills/subagent-yield-failure-recovery/SKILL.md
T
Frank a34322aeb0 refactor(skills): consolidate managed skill library 94 -> 25
The managed-skill library was regenerated: 94 narrow per-incident skills
replaced by 25 broader ones (radiance-*, llamacpp-*, homepage-*, fleet/
endpoint ops). Git renders this as mass delete + mass add because whole
directories changed name; old content stays in history at 12c5e88.

Surface check: the 25 on disk are exactly the skills the harness advertises
this session.
2026-10-09 13:17:48 -07:00

1.7 KiB

name, description
name description
subagent-yield-failure-recovery Recover a subagent's full structured report when it exited without yielding (SYSTEM WARNING, structured output unavailable)

A subagent that solved the task but exited without calling yield (status failed, "exited without calling yield tool") usually still has its full payload in the transcript. Recover it; do not re-run the subagent.

Procedure

  1. read agent://<id> — the preview truncates long lines (~768 chars); the full JSON draft appears in the transcript, not here.
  2. Dump the raw transcript with line truncation off and persist it:
    const raw = await read("history://<id>:raw");
    await write("/tmp/hist.txt", raw);
    
  3. Extract the report string. The transcript embeds the agent's draft as a JS object literal (report: "...." with escaped quotes/newlines), repeated across retries — take the longest match, then JSON-unescape:
    import re, json
    raw = open('/tmp/hist.txt', encoding='utf-8', errors='replace').read()
    best = max((m.group(1) for m in re.finditer(r'report: "((?:[^"\\]|\\.)*)"', raw)), key=len)
    open('report.md','w').write(json.loads('"' + best + '"'))
    
    Same pattern works for summary:/files: fields.
  4. Treat recovered content as UNVERIFIED scout output: cross-check high-stakes claims at primary sources before publishing (scouts can conflate similarly-named projects; one recovery revealed "arc53's quantization pruner" when the tool was actually p-e-w/heretic, an abliteration tool).

Why

  • agent://<id> and the task-result preview truncate per line; only history://<id>:raw carries the full text.
  • Re-spawning the subagent wastes minutes and the cap slot; the work product already exists in the transcript.