Skip to content

OpenCode Vitals 0.1.6

Choose a tag to compare

@github-actions github-actions released this 28 Sep 09:38
· 24 commits to main since this release

[0.1.6] - 2026-09-28

The bar stopped showing you somebody else's numbers, and stopped ignoring the
work you delegated.

Fixed

  • A session with no measurements displayed another session's totals. The bar
    resolved no session for a freshly opened tab and fell back to the last session
    that published a record, so a new session showed another one's turns and
    tok/s with nothing on screen to say so. It now says it is waiting for a
    response, and names no number it cannot attribute.
  • Every OpenCode instance on the machine overwrote the current session. The
    status directory is one temporary path shared by all of them, and the current
    session was a single slot, so the last instance to publish won it. The file is
    now a map keyed by project, and the plugin merges the other entries instead of
    replacing them. A v1 file is still read, so a bar and a plugin from different
    versions can overlap during an update.
  • The bar is told which project spawned it. It is one window for one screen
    and every project shares the files it reads; it now answers only with sessions
    belonging to its own project, and falls back to a guess only when there is
    exactly one candidate and so nothing to choose between.
  • Subagent work was never counted. A subagent runs as a session of its own,
    so its steps and tokens landed in a bucket nobody was looking at: measured on
    one machine, 22 of 50 tracked sessions were subagents holding 3267 of 5044
    steps. The parent link is now asked of the session API once per session, and
    the delegated steps and tokens are credited to the session that asked for the
    work.
  • A bar outlived every session it was measuring. Whether a bar belongs on the
    screen was decided from the OpenCode process being alive, and a service stays
    alive with nothing open, so the bar stayed up for a program nobody was using.
    It now stands down after fifteen minutes with no measured response. A session
    that has never been measured keeps the bar, so a first run still shows it.
  • The last10 label now reads last10 resp. It is the mean rate of the last ten
    responses and always was; the steps inside one reply are not ten separate
    answers. The card is 450 pixels wide to fit the clearer label.

Changed

  • A subagent's streaming time is deliberately not added to its parent's. The
    session rate is generated tokens over stream time, and a subagent's tokens
    without its seconds would print a speed the parent never ran at. The parent's
    rate stays its own; the subagent's rate stays on its own session, where its own
    time is known. Delegated work is counted apart in subagentTurns and
    subagentSteps so the split is visible in the record.
  • Sessions carry their project, and every totals snapshot carries it too, so a
    bar can tell "not measured yet" from "another project's measurement".
  • barExpectedFrom takes an openSessionAt; SUBAGENT_FIELDS,
    SESSION_LOOKUP_TIMEOUT_MS, IDLE_HIDE_MS and COMPANION_TICK_MS are
    exported for the tests.

Measured

  • 246 plugin checks and 142 bar checks, up from 223 and 135. The bar suite grew
    by seven checks that pin the new attribution rules: no borrowing another
    session's numbers, per-project isolation, a v1 file still readable, and the
    delegated work counted in the parent without touching its rate. The plugin
    suite grew by nine: the subagent credit and every way it must not leak into
    the parent's rate, a root session, a missing session API, the project on the
    record, the per-project current-session map, and the idle stand-down.

Upgrade: npx opencode-vitals install