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

@gotgenes/opencode-session-context

v1.4.0

Published

OpenCode plugin for cross-session context access in subagent workflows

Readme

@gotgenes/opencode-session-context

OpenCode plugin for cross-session context access in subagent workflows.

What it does

This package provides a plugin that exposes parent_session_messages, session_messages, and session_messages_batch tools for reading conversation history across sessions.

When OpenCode dispatches a subagent via the Task tool, the subagent runs in a fresh child session with no access to the parent's conversation history. This plugin bridges that gap by fetching the parent session's messages through the OpenCode SDK.

Installation

Add the plugin to your opencode.json:

{
  "plugin": ["@gotgenes/opencode-session-context"]
}

How it works

The plugin registers these tools:

| Tool | Description | | --- | --- | | parent_session_messages | Reads the current session's parentID via the SDK and fetches all messages from the parent session. | | session_messages(sessionId) | Fetches all messages from any session by ID. | | session_messages_batch(sessionIds) | Fetches all messages from multiple sessions by ID and concatenates them with === Session: <id> === delimiters. |

Both return structured text with agent attribution, full message text, and one-line summaries for tool invocations (using the title computed by OpenCode).

Output format

1. user
How do I fix the login bug?

---

2. assistant (tdd) [anthropic/claude-opus-4 (high)]
Let me check the existing test helpers.

  [tool] Read file: web/app/auth/routes/sign-in.test.ts → completed
  [tool] bun test verify.test.ts → error: Process exited with code 1

I see the test is failing because...

Use cases

Retro-stage analysis

A retro-stage subagent can analyze the parent session's conversation to capture retrospective observations (friction, wins, user-side feedback) without requiring a human to invoke a command or switch agents.

Parent-orchestrated TDD session reconstruction

In parent-orchestrator workflows, task_id values returned by the Task tool are session IDs. A reviewer agent can reconstruct full TDD phase ordering by:

  1. Calling parent_session_messages to read the orchestrator thread and extract task_id values
  2. Calling session_messages_batch([taskId, ...]) for the tdd-red, tdd-green, and tdd-refactor subagent sessions
  3. Reviewing full per-phase detail, including file writes, test runs, and checkpoint calls