npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

opencode-task-result-guard

v0.1.2

Published

OpenCode server plugin that recovers missing and incomplete subagent task handoffs.

Readme

opencode-task-result-guard

OpenCode server plugin that repairs missing or incomplete foreground Task handoffs before the parent agent sees them.

OpenCode can currently mark a child Task complete while returning an empty <task_result> when the child's terminal assistant message has no text. A separate race can let an auto-fallback plugin continue the child after the parent already received that empty result. Long-running critic agents can also compact and return a progress note instead of their required final report.

The guard runs at tool.execute.after and leaves normal Task output unchanged.

Behavior

  • Reuses the newest non-synthetic child text when the terminal Task result is empty.
  • Waits a bounded interval for a late report after ContentFilterError.
  • Returns a visible <task_error> with the same task_id when no text can be recovered.
  • Optionally recognizes incomplete agents by name prefix and gives them one synthesis-only finalizer turn.
  • Injects a hidden finalizer agent with all tools denied.
  • Bounds repaired output while preserving its beginning and tail.

Install

opencode plugin opencode-task-result-guard --global

Or add it to global opencode.json:

{
  "plugin": ["opencode-task-result-guard"]
}

Restart OpenCode after installation.

Requires an OpenCode build with modern server plugin entrypoints (exports["./server"]). Tested against 0.0.0-beta-202607101924.

Options

Plugin options use an OpenCode plugin tuple:

{
  "plugin": [
    [
      "opencode-task-result-guard",
      {
        "lateResultWaitMs": 180000,
        "finalizeTimeoutMs": 180000,
        "pollMs": 1000,
        "maxBytes": 49152,
        "finalizerAgent": "task-result-guard-finalizer",
        "finalizerModel": "openai/gpt-5.4-mini",
        "finalizerReasoningEffort": "high",
        "finalizeAgentPrefixes": ["eye-"],
        "finalMarker": "## Verdict"
      }
    ]
  ]
}

finalizerModel and finalizerReasoningEffort are optional. Without a model, the finalizer inherits the child session's model. Set finalizeAgentPrefixes to an empty array to disable semantic finalization while keeping empty-result recovery.

Set lateResultWaitMs to 0 to disable waiting for post-error fallback output.

Environment fallbacks are also supported:

  • OPENCODE_TASK_RESULT_WAIT_MS
  • OPENCODE_TASK_FINALIZE_TIMEOUT_MS
  • OPENCODE_TASK_RESULT_POLL_MS
  • OPENCODE_TASK_RESULT_MAX_BYTES
  • OPENCODE_TASK_FINALIZER_AGENT
  • OPENCODE_TASK_FINALIZER_MODEL
  • OPENCODE_TASK_FINALIZER_REASONING_EFFORT

Tuple options take precedence over environment variables.

Limits

This covers synchronous foreground Task results. Background Task completion is injected as a synthetic parent message outside tool.execute.after and is not repaired by this plugin.

Semantic completeness is unknowable for arbitrary agents. By default, only agents whose names start with eye- are checked for a line equal to ## Verdict. Empty-result recovery applies to every agent.

The guard never exposes reasoning parts as a result. If recovery fails, it returns an explicit error and resumable task ID instead.

Relevant upstream reports include #24447, #27210, and #32132.

Development

bun install --frozen-lockfile
bun test
bun run build
npm run test:package
npm pack --dry-run --json --ignore-scripts