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

@op1/threads

v0.3.2

Published

Opinionated background agents for OpenCode V2: visible worker sessions that report back with a verdict, and durable parallel workflows that survive restarts.

Readme

Threads for OpenCode

Opinionated background agents for OpenCode V2: visible worker sessions that report back with a verdict, and durable parallel workflows that survive restarts.

npm license

Threads lets one OpenCode conversation hand work to others. Each worker is an ordinary OpenCode conversation with its own folder, agent, and model. It runs in the background and reports back to the conversation that started it. You can open any worker, read what it did, and send it a follow-up.

For bigger jobs, Threads runs dynamic workflows. The agent writes a short JavaScript script that sends work to many workers at once, checks what they return, and can resume after a restart.

The opinions

The "op" in op-threads stands for opinionated. Threads makes these choices for you:

  • Workers are real conversations. Each worker is a top-level OpenCode session that you can open in a tab. Nothing runs where you can't see it.
  • Idle is not done. A worker finishes by reporting PASS, PASS WITH NOTES, FAIL, or INCONCLUSIVE, with evidence. A worker that stops without a report has no verdict.
  • Reports come to you. The report lands in the conversation that started the worker, so the agent doesn't have to poll.
  • One level of workers. Workers can use OpenCode's subagents, but they can't start workers of their own.
  • Quiet by default. Threads opens no tabs by itself. A small footer indicator shows what's running and disappears when nothing is.
  • Workflows keep a journal. A resumed run reuses every finished step instead of doing it again.

Install

Threads 0.3.2 needs OpenCode 2.0.28. On OpenCode 2.0.26 or earlier, use Threads 0.2.8.

  1. Add the server plugin:

    opencode plugin add @op1/threads
  2. Add the terminal plugin to ~/.config/opencode/cli.json. The command in step 1 doesn't do this.

    {
      "plugins": [{ "package": "@op1/threads" }]
    }
  3. Restart OpenCode.

Optionally, copy skills/managed-sessions into ~/.config/opencode/skills/. It teaches agents when to start a worker and how to brief it.

How do I run background agents in OpenCode?

Ask your agent in plain language:

Start a Threads worker in /path/to/my-app to review the auth changes. Report findings with file paths.

The agent calls threads_spawn, and the worker starts in the background. Your conversation stays free. While the worker runs, the prompt footer shows:

⠋ 1 worker ctrl+x j

Press ctrl+x j to open the Threads list. Highlight the worker and press Enter to open its conversation.

When the worker finishes, its report arrives in your conversation. Workers that pass leave the list by themselves. Workers that fail, or stop without a report, stay in the list so you notice them.

How do I run agents in parallel?

Describe the job with /workflow-run:

/workflow-run Audit src/auth and src/billing for missing authorization checks. Confirm each finding independently.

The agent writes a workflow script and starts it in the background. Run /workflows to watch its steps, open any worker, and pause, stop, or resume the run.

Threads or subagents?

Use one of OpenCode's built-in subagents for a quick lookup or a small review whose answer comes straight back to you. Use a Threads worker when you want:

  • A separate conversation that you can open, read, and follow up on.
  • Work assigned to its own folder or worktree.
  • A clear verdict with evidence, not only a finished run.
  • A specific agent profile and model for one piece of work, such as an independent reviewer.

Use a Threads workflow when many agents should run in parallel, or when later steps depend on earlier results. You can mix all three: workers can use subagents too.

Learn more

| To | Read | | --- | --- | | Start workers, pick roles, and follow up | Work with workers | | Run, watch, and save workflows | Run a dynamic workflow | | Monitor unattended workflows | Workflow heartbeats | | Change limits, commands, and shortcuts | Configuration | | Look up tools, fields, and data shapes | Reference | | Understand retries, permissions, and recovery | How Threads works | | Write workflow scripts by hand | Workflow runtime contract | | Develop or release Threads | Development | | See what changed between versions | Changelog |

License

MIT