Skip to content

v0.1.0

Choose a tag to compare

@maximtop maximtop released this 07 Sep 14:25
· 23 commits to master since this release

First release.

What it does

Renames an opencode session once, right after the first user message:

  • First message referencing a GitHub PR → [repo] KEY-123 Review pull/N <PR title>. Full URLs with any suffix (…/pull/N/changes, #diff…, ?…) and the short owner/repo#N form are detected; short forms are verified via gh (file references like src/rename.ts#42 are dropped). With prLinkLlm on, a small locked-down child session can extract a PR reference mentioned without a link.
  • Otherwise, inside a git project → [project] KEY-123 <opencode auto-title>; the issue key comes from the branch in .git/HEAD. Linked worktrees resolve to the main repo name + worktree branch key.
  • Overlong titles are shortened deterministically, or via the configured small_model when smartShorten is on.

Safety

  • Renames exactly once per session — the state file survives restarts.
  • A title set by hand or by another tool is never replaced; a late re-write of the recorded auto-title is corrected at most once, before the first idle.
  • gh is pinned to github.com — a PR URL from an untrusted message can never redirect your token to another host (GHES deliberately unsupported).
  • Deterministic by default; optional LLM modes run in throwaway child sessions with all tools disabled.

Install

From a checkout:

git clone https://github.com/maximtop/opencode-session-namer
cd opencode-session-namer
pnpm install
ln -s "$PWD/src/index.ts" ~/.config/opencode/plugins/session-namer.ts

npm install ("plugin": ["@maximtop/opencode-session-namer"]) lands with the first npm publish. Config: ~/.config/opencode/session-namer.json — all keys optional, see README. PR-based naming needs the gh CLI; without it the plugin degrades to project naming.

Full changelog: initial implementation — 54 review findings addressed across 3 review rounds.