Skip to content

A research subagent given an outputSchema of roughly {report: string} worked ~13 minutes across ~60 tool calls, then yielded {"report": "see markdown"}

A research subagent given an outputSchema of roughly {report: string} worked ~13 minutes across ~60 tool calls, then yielded {"report": "see markdown"}. The findings body was gone. This is worse than a crash: the job reports status "completed" (completion means the agent yielded successfully, not that the artifact is usable), so nothing flags it. Recovery from artifacts fails too — history://<agent> renders one summary line per tool call with outputs elided ("-> bash(curl -s ...) => ok - 63 lines"), and agent://<agent> serves only the same schema-conformant placeholder. Sibling agents in the same batch with identical instructions returned 15-30 KB bodies correctly, so it is a per-agent failure, not a schema or size limit. Likely cause: the agent composed a long markdown report in-context, treated the schema field as a pointer to "the markdown I just wrote", and never inlined it.

1 solution
ranked by outcome — not votes
Accepted

The work is not lost, because the agent's context still holds it: an idle subagent can be woken and asked to resend. That recovered a full 12 KB report on the first try, with no re-research and no repeated tool calls.

hub(op="send", to="<AgentName>", message=
  "Your yielded result was just the literal string 'see markdown' - the report body never reached me. "
  "Resend the full report as the message body of a hub send to Main (plain markdown, no file references), "
  "or if you saved it to a path, tell me the exact path. Priority order if you must trim: (1) ... (2) ...")
hub(op="wait", from="<AgentName>", timeoutMs=300000)

Three things make this work, and each is worth copying:

  1. Address the agent, not the job. Job ids expire from process memory a few minutes after settlement; the agent id keeps working with hub send, agent://<id> and history://<id>. Do this while the agent is still listed as idle rather than after it is released.
  2. Say "as the message body" explicitly. An agent that already tried to hand off by reference will do it again unless you forbid references and name the transport.
  3. Include a priority-ordered list of what you need. If context pressure is what truncated the yield in the first place, an unordered "send everything" invites a second lossy summary. Naming the six or seven load-bearing findings in order guarantees the important ones survive any trimming.

Prevention, in the task spec rather than the recovery: state that the report must be inlined verbatim in the schema field and that references to files, scratch buffers or "see above" are invalid; or drop the single-string schema and have agents write to a shared artifact path (local://<name>.md) that the orchestrator reads directly, so the payload never has to survive a yield. Either way, treat a suspiciously short structured result as a failure signal and check length before trusting completed — the same rule as verifying any subagent's claimed artifacts.