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-session-tracker

v2.3.34

Published

OpenCode TUI plugin & Telegram Integration - Track active sessions/subagents in the sidebar and interact remotely from your phone

Readme

OpenCode Session Tracker

npm version npm downloads GitHub stars

One session tracker for OpenCode, two surfaces: a TUI sidebar in your terminal and a Telegram remote control on your phone. Both stay in sync automatically — pick up a session in one place, and it's right where you left it in the other.


What you get

  • One session list, everywhere. Sessions and subagents are tracked in real time and shown identically in the sidebar and in Telegram's /sessions and /history. Active and archived sessions are always bucketed the same way on both sides.
  • Session hierarchies. Subagents nest under their parent session like folders. Toggle [+]/[-] to expand or collapse; active subagents pop out automatically even while their parent is collapsed.
  • Live status everywhere. The same status — running, waiting, idle, asking a question, waiting on a permission — is reflected as a colored tag in the sidebar and as a live-updating message in Telegram.
  • Remote control from your phone. Send prompts, follow your agent's thinking and tool calls as they happen, and approve or deny permission requests and interactive questions — all via Telegram buttons, without touching your keyboard.
  • Cross-window / cross-project routing. Multiple OpenCode windows are tracked together. Telegram routes prompts to the correct project's terminal window and follows you as you switch sessions.
  • Instance management from Telegram. List running projects, launch OpenCode in a project that isn't running, or close/restart the current instance — all from /projects.
  • History, your way. Sessions idle for 24h automatically move to History. Don't want to wait? Cmd+click (Alt+click on Windows/Linux) a session in the sidebar to archive it to History immediately.

🖥️ TUI Sidebar

  • Session Hierarchies: Subagents nest under their parent session like folder trees. Toggle expand/collapse with [+] or [-].
  • Smart Active Pop-out: Collapsing a parent won't hide running work — active subagents pop out automatically.
  • Cmd/Alt+click to archive: Cmd+click (Alt+click on Windows/Linux) any session to move it into History right away, without waiting for the 24h auto-expiry. (Plain right-click gets intercepted by your terminal's own context menu, and ctrl+click gets remapped to right-click by macOS itself — neither reaches the app reliably.)
  • Visual Status Tags:
    • [RUN] (Green): Agent is actively running a tool or generating code.
    • [IDLE] (Gray): Agent completed its task and is idle.
    • [WAIT] (Yellow): Agent is waiting or retrying an internal process.
    • [ASK] (Magenta): Agent is waiting for you to answer a question.
    • [PERM] (Magenta): Agent is waiting for permission to execute a command.

📱 Telegram Remote Control

  • Live Status Streaming: Follow your agent's thinking process and tool executions, formatted cleanly, in real-time.
  • Interactive Approvals: Answer questions and authorize terminal commands (allow or deny permissions) directly via Telegram buttons.
  • Session & History Browsing: /sessions lists everything currently active; /history lists everything archived — exactly matching what the sidebar shows.
  • Project Control: /projects lists every known OpenCode project, shows which are online, and lets you launch, close, or restart an instance remotely.
  • Cross-Process Routing: Multi-window support automatically syncs session views and routes prompts to the correct terminal window.
  • Zero Overhead: Idle-state polling is fully cached and throttled to respect Telegram rate limits.

[!TIP] To get started with the mobile control bot, check out the Telegram Setup Guide.


📥 Installation

Install globally using the official OpenCode plugin command:

opencode plugin opencode-session-tracker --global

Restart OpenCode, and the sidebar will load automatically. Telegram control activates on top of it as soon as you add a telegram.json config — see the setup guide.


🔧 Developer Setup

If you want to customize or develop the plugin locally:

  1. Clone the repository and install dependencies:
    git clone https://github.com/ykocaman/opencode-session-tracker.git
    cd opencode-session-tracker
    npm install
  2. Build the plugin:
    npm run build
  3. Load the plugin locally in OpenCode by adding the absolute path of this folder to your tui.json configuration file.