agentsclimarketplace

Async subagent resume on missing artifact

Skill kjuhwa/skills-hub/skills/workflow/async-subagent-resume-on-missing-artifact

Self-correcting knowledge corpus for Claude Code — 9 stable shape clusters, bias-correction pipeline baked into contribution flow. 47 papers, 45 techniques, 1.1k skills.

Install
npx -y skills add kjuhwa/skills-hub --skill async-subagent-resume-on-missing-artifact

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

When an async subagent is reported "completed" but its final message hints at unfinished work (e.g., "Now let me build…"), verify the expected on-disk artifact before moving on; if missing, use SendMessage to the agent id to finalize rather than re-dispatching a fresh agent.

SKILL.md

1.8 KB, 303 tokens by cl100k_base, as published. Nobody here has run it

Resume an async subagent instead of re-dispatching

Async subagents can be marked "completed" even when their final user-facing message is a mid-thought like "I have all the data needed. Now let me build…". Their in-memory plan may have not resulted in an actual file write. Re-dispatching a brand new agent loses all the setup context.

Protocol

  1. Always verify artifact on disk after an async agent reports completion and you expect a file:

    ls -la docs/expected-artifact.json
    
  2. If missing and the result message looks truncated / mid-action:

    • Do NOT spawn a fresh agent.
    • Call SendMessage to the agent's id with a pointed follow-up:
      SendMessage({
        to: "<agentId>",
        message: "The file `docs/x.json` was not actually written. Please use the Write tool to save the complete output you built. Report back with the final summary."
      })
      
    • The runtime will resume the agent from its transcript — all prior analysis is preserved.
  3. Wait for the completion notification; verify artifact appears on disk.

When to give up and re-dispatch

  • Two SendMessage rounds without the file appearing.
  • Agent responds that the data it built is no longer in context.
  • In those cases, dispatch a fresh agent with a simpler, more explicit "write the file first, summarize after" prompt.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.