Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Hermes + OpenCode Session ManagerNew to Visual Studio Code? Get it now.
Hermes + OpenCode Session Manager

Hermes + OpenCode Session Manager

yudaiyan

|
116 installs
| (0) | Free
Batch manage, resume, and organize Hermes Agent and OpenCode sessions in VS Code.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Hermes + OpenCode Session Manager

Manage Hermes Agent and OpenCode sessions directly within VS Code.

Features

  • Hermes Session Manager
    • Resume one or more Hermes sessions into VS Code terminal tabs.
    • Show a session's recorded directory, with the Hermes CLI Workspace label as a fallback for older sessions.
    • Resume a session in its recorded directory when that directory still exists.
    • Rename sessions inline.
    • Delete single or multiple stopped sessions.
    • Optionally delete parent Hermes sessions discovered from ~/.hermes/state.db.
    • Stop running sessions by PID.
    • Clean untitled/empty sessions, including newly exposed empty child-session chains.
    • Create a named session, rename it, and immediately resume it in a terminal.
  • OpenCode Session Manager
    • List OpenCode sessions across projects from ~/.local/share/opencode/opencode.db.
    • Resume one or more sessions in their original project directories.
    • Detect active OpenCode sessions from each process's local --port status endpoint, so /fork and /new follow the current session instead of stale startup arguments.
    • Discover manually started, port-enabled OpenCode processes and retained processes after Reload Window.
    • Use OpenCode session events to follow rename, fork, and new-session changes while the monitor is active.
    • Show a directory-level count for idle OpenCode terminals; for a manual idle terminal without --session, use the most recently updated same-directory session only as a title-sync candidate.
    • Delete stopped sessions and stop running OpenCode processes.
    • Clean empty/untitled sessions and generated subagent sessions.
    • Start a new OpenCode terminal.
    • Optionally append --auto and a probed random five-digit --port to every extension-started OpenCode terminal.
    • Notify through VS Code when a discovered port-enabled session finishes a busy turn; the notification can focus its terminal when association is available.
    • Toggle subagent-session visibility from the manager toolbar; the choice persists between openings.
  • Explorer Context Menu
    • Right-click a folder and run 打开 Hermes.
    • Pick one or more Hermes sessions associated with that directory or Git repository, or start a new Hermes terminal in the folder.
    • Right-click a folder and run 打开 opencode.
    • Pick one or more existing OpenCode sessions for that directory or start a new one.

Requirements

  • For Hermes features: hermes must be installed and available in PATH.
  • Hermes directory matching and cwd details require the sqlite3 CLI because they are read from ~/.hermes/state.db.
  • For OpenCode features: opencode must be installed in PATH or at ~/.opencode/bin/opencode.
  • OpenCode session listing requires the sqlite3 CLI because sessions are read from the local OpenCode database.

Settings

Setting Default Description
hermesSessionManager.hermes.yolo false Appends Hermes's --yolo option to every terminal launched by this extension. This bypasses dangerous command approval prompts.
hermesSessionManager.opencode.autoApprove false Appends OpenCode's --auto permission-approval option to terminals launched by this extension.
hermesSessionManager.opencode.useRandomPort false Probes a random port from 10000 to 65535, then passes it as --port <port> to terminals launched by this extension. The best-effort probe does not reserve the port.
hermesSessionManager.opencode.completionNotifications true Sends a VS Code notification when a discovered port-enabled OpenCode session finishes a busy turn and becomes idle. It automatically enables a random port for extension-started sessions.

The OpenCode manager toolbar can hide subagent sessions. This choice is remembered locally and uses the session database's parent_id relationship.

Commands

This extension contributes the following command:

  • Hermes: Resume Sessions: opens the Hermes session manager.
  • 打开 Hermes: folder context menu command for resuming a directory-associated Hermes session or starting one in that directory.
  • OpenCode: Resume Sessions: opens the OpenCode session manager.
  • 打开 opencode: folder context menu command for opening OpenCode in that directory.

Development

cd extension
npm install
npm test           # compile and run Node tests
npm run compile
npx vsce package
code --install-extension hermes-session-manager-0.1.12.vsix --force

Release Notes

0.1.12

  • Do not offer terminal-title rebuilding for OpenCode subagent completion notifications; subagent notifications only provide terminal focus when available.

0.1.11

  • Discover manually started, port-enabled OpenCode processes and continue monitoring them after Reload Window.
  • Use OpenCode session events and idle-session lookup to detect rename, fork, and new-session changes while the monitor is active.
  • Keep completion and title-update notifications non-blocking, expose detailed monitor diagnostics in the Output panel, and never rebuild a terminal without an explicit user action.

0.1.10

  • Track active OpenCode sessions from each process's status port so /fork and /new do not leave an old session marked as running.
  • Show idle OpenCode terminal counts at the directory level and include session IDs in list details to distinguish same-title forks.

0.1.9

  • Mark running OpenCode sessions only when the process explicitly carries --session <id>.
  • Show a directory-level notice for OpenCode processes without a session argument, without guessing a session ID.
  • Added an opt-in Hermes --yolo launch setting.
  • Added batch recovery to both directory context-menu session pickers.
  • Made Hermes empty-session cleanup rescan orphaned empty child-session chains.
  • Added VS Code notifications for extension-started OpenCode sessions that return from busy work to idle.

0.1.8

  • Added the 打开 Hermes Explorer action for directory-associated Hermes sessions and new directory-scoped terminals.
  • Added title, workspace, and full-path filtering to both session managers.
  • Fixed OpenCode session timestamps stored in milliseconds and simplified duplicate directory display.

0.1.7

  • Added opt-in OpenCode --auto and random five-digit --port launch settings.
  • Added a persisted toolbar toggle for hiding or showing OpenCode subagent sessions.

0.1.6

  • Renamed the public product to Hermes + OpenCode Session Manager.
  • Preserved the existing Marketplace extension ID and command IDs for seamless upgrades.

0.1.5

  • Refreshed README and changelog to match the current Hermes + OpenCode implementation.
  • Updated package metadata for the next VSIX build.

0.1.4

  • Added OpenCode session management.
  • Added folder context menu entry for OpenCode.
  • Added running-process detection, stop actions, cleanup actions, and new-session entry points.
  • Fixed Hermes new-session creation in WSL by running hermes chat -q from the user's home directory.

0.1.0

  • Initial release of Hermes Session Manager.
  • Features: Batch resume, rename, delete, and new session creation.
  • Improved UI with status grouping for running sessions.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft