Releases: michalekz/claude-bridge
Release list
v0.7.6 — cross-role meta-pattern evidence
[0.7.6] — 2026-06-30
Changed
- Role-skill documentation update: expanded the cross-role "confidence without substance" guidance in the bundled role playbooks with a further worked example. No code changes; skill content only.
v0.7.5 — role-manager post-compact recipe
[0.7.5] — 2026-06-30
Changed — claude-bridge-role-manager: post-compaction recipe
Added guidance for re-onboarding a role after a context compaction:
- Worker peers re-align against durable artifacts (locked docs, code). The standard recipe (
peer_list,peer_inbox_read, reload canonical docs) is enough. - Managers / orchestrators also need the live thread: who is waiting on what, the intent behind decisions, the cross-cutting view. That lives in the conversation, not the docs, so docs alone are insufficient.
- A low
/contextpercentage right after a compaction is a warning sign that only a lossy summary was loaded. A compact summary is for orientation, not for reasoning; load the full material before deciding.
A shared post-compaction self-check ("is real material in my context, or just pointers to it?") was added to both bundled role skills.
No code changes; skill content only. Tool set unchanged (13 tools, same APIs).
v0.7.4 — peer_context_status undercount fix
[0.7.4] — 2026-06-30
Fixed — peer_context_status undercount for fresh / post-clear sessions
peer_context_status significantly undercounted token usage for sessions that had recently gone through cache invalidation (after /clear, autocompact, or session start), in some cases reporting a few percent when the real figure was over 80%.
- Root cause: v0.7.0–v0.7.3 read
cache_read_input_tokensalone. That works for mature cached sessions wherecache_readdominates, but in a freshly filling cache most input lands incache_creation_input_tokenswhilecache_readis tiny, so the reported percentage collapsed toward zero. - Fix:
tokensUsed = cache_read + cache_creation + input + output— the total tokens in the context window after the last assistant turn. This matches/contextacross both fresh and mature sessions.
Tests
- 263 → 265 (+2 covering the full-formula sum and missing-field handling).
v0.7.3 — model_info MCP tool
[0.7.3] — 2026-06-29
Added — model_info MCP tool
Static lookup tool returning canonical Claude model metadata. No JSONL scan, no network call — just an in-process table sourced from Anthropic platform docs.
Per-model fields:
id,displayName,family(opus/sonnet/haiku/fable/mythos),generation(current/legacy/deprecated)contextWindow,maxOutputTokenspricing(input/output per MTok)capabilities(vision, extendedThinking, adaptiveThinking)knowledgeCutoff,trainingDataCutoffnotes(special quirks, EOL dates)
Usage:
model_info()— list all 10 known modelsmodel_info({ model: "claude-opus-4-7" })— single lookup (date suffix + [1m] stripped)model_info({ generation: "current" })— filter by lifecycle
Refactored
- Extracted canonical model table to
src/parser/model-metadata.ts(= single source of truth shared betweencontext-usage.tsandmodel_infotool). detectContextLimitnow delegates tolookupModelfrom the shared table.
Tests
- 248 → 263 (+15 covering normalization, lookup, table integrity).
v0.7.2 — canonical model context-window lookup
[0.7.2] — 2026-06-29
Patch: replace empirical heuristic with canonical model → context-window lookup.
Fixed
detectContextLimitnow uses a canonical lookup table sourced from Anthropic platform docs (verified 2026-06-29):
| Model | Context window |
|---|---|
| Opus 4.6 / 4.7 / 4.8 | 1M |
| Sonnet 4.6 | 1M |
| Fable 5 / Mythos 5 / Mythos Preview | 1M |
| Haiku 4.5 | 200k |
| Legacy: Opus 4.1 / 4.5, Sonnet 4.5 | 200k |
Previous v0.7.1 used the heuristic "tokensUsed > 200k → assume 1M". That worked but was hacky. v0.7.2 uses official model metadata; heuristic remains as defensive fallback for unknown/future model ids.
- Date suffix on model ids (
claude-haiku-4-5-20251001) is stripped before lookup. - Explicit
[1m]tag still wins (overrides lookup for legacy models).
Tests
- 244 → 248 (+4 covering canonical lookup, all generations, date-suffix normalization).
v0.7.1 — context-limit detection heuristic
[0.7.1] — 2026-06-29
Patch fix discovered during v0.7.0 smoke test (= empirical heuristic, superseded by v0.7.2 canonical lookup).
Fixed
-
peer_context_statuslimit detection — model strings in JSONL don't always carry the[1m]suffix. v0.7.1 added empirical heuristic: iftokensUsed > STANDARD_LIMIT (200k), bump toONE_M_LIMIT (1M). v0.7.2 replaces this with canonical lookup table. -
dist/bundle.cjsrebuilt with the fix.
Tests
- 243 → 244 (+1 for heuristic).
v0.7.0 — self-defending context lifecycle + role playbooks
[0.7.0] — 2026-06-29
Major release — self-defending context lifecycle + practitioner-grounded role playbooks.
Added — MCP tools
-
peer_context_status— read autocompact-relevant statistics for self or other peer(s). ReturnstokensUsed,contextLimit,percentUsed,autocompactRisk(low/medium/high),model,lastTurnAt. Data source:usage.cache_read_input_tokenson most recent assistant event in peer's JSONL — matches/contextTotal exactly. Targets:toomitted = self;to: 'all'= all active peers + self;to: 'alice'= single peer;to: ['alice', 'bob', 'self']= bulk. -
peer_set_context_guard— self-write configuration for context-usage guard. Defaults:enabled=true,warnAtPercent=0.85,criticalAtPercent=0.95,notifyPeerIds=[],broadcastProject=false. Self-targeted only — peer controls own settings. Persisted to~/.claude-bridge/guard/<sessionId>.json. -
peer_set_notification— self-write configuration for idle-beep notification. Defaults:enabled=false,minIdleSeconds=30. Persisted to~/.claude-bridge/notify/<sessionId>.json.
Added — bundled role skills
Two role playbooks for multi-chat orchestration now ship with the plugin:
-
claude-bridge-role-manager— a playbook for an agent orchestrating 2–N worker peers. Covers dispatch patterns, gating by reversibility / blast-radius / outward-facing impact, verify-don't-guess, treating worker output as data rather than authorization, hub-and-spoke contracts plus mesh consults, handling crossed async messages, a FREEZE-at-ready-for-gate convention, and managing upward to the human. A detailed PLAYBOOK.md adds dispatch templates, pre-flight downstream isolation, anti-patterns, cross-machine handoff, and peer-death recovery. -
claude-bridge-role-memory-keeper— a lighter playbook for a dedicated memory-keeper peer in teams of 3+. Five principles (single-writer / route-to-keeper, pointer-not-duplicate, doc-wins-on-conflict, verify-before-write with dedup across senders, reconcile after each coordination round) plus the write and reconcile workflows.
Changed
-
Bundle rebuilt so the self-read fix from v0.6.1 actually ships (the published bundle had been stale).
-
Naming convention documented (
docs/NAMING-CONVENTION.md) — MCP tools are snake_case; skills useclaude-bridge-role-*for role-based playbooks andclaude-bridge-*for operational ones. -
claude-bridgeskill updated — removed stale references to theself_readerror (removed in v0.6.1).
Notes
- v0.7.0 introduces infrastructure for context guard (tools + state files). Wake-time warning injection into channel pump is scheduled for v0.7.1. v0.7.0 lets peers read each other's status; v0.7.1 will auto-fire warnings when threshold crossed.
- Tool count: 9 → 12.
Tests
- 230 → 243 (+13 for context-usage parser).
- All passing, TypeScript strict, biome lint clean.
v0.6.1 — agent can read/search its own session
Patch release allowing an agent to read and search its own session. Two paternalistic blocks were removed because they actively hurt the most useful recovery scenarios.
Changed
`peer_chat_read` no longer rejects own session
Previously `peer_chat_read { to: }` returned `self_read` error with message "Cannot read own chat — your own context is already loaded". That assumption is wrong in three common scenarios where it matters most:
- Autocompact — context window is compressed, original detail is gone from in-memory but lives on disk.
- `/clear` during a long session — agent intentionally cleared its context, JSONL stays intact on disk.
- Resume after crash / restart — only partial context is reloaded, full history is on disk.
In all these, querying own JSONL via `peer_chat_read` is the legitimate (and sometimes only) recovery path.
`peer_chat_search` no longer silently filters out caller's own session
Same reasoning. Post-autocompact / long-session use needs to search full on-disk history, including own session. The silent filter made searches look incomplete without explanation.
`peer_ask` self-send block stays intact
`peer_ask { to: }` still returns `self_send` error. Sending a message to your own inbox is genuinely a weird loop with no useful semantic.
Why this isn't a breaking change
No tool signature changes. Both tools accept the same args. Behavior change only: previously-erroring calls now succeed. No existing correct code can break.
Tests
- Existing self-rejection tests flipped to verify happy-path: `peer_chat_read { to: self }` returns own messages; `peer_chat_search` includes self session in scope.
- 230/230 tests pass.
See CHANGELOG.md for the full record.
v0.6.0 — dynamic terminal tab title
Minor release adding dynamic terminal tab title that tracks each peer's `displayName` (ai-title) automatically. End of "all my Claude tabs look identical" — orchestrators with 4+ worker terminals can finally tell them apart at a glance without manual `--name` flags or right-click renames.
Added
When a peer's `displayName` resolves or changes (typically when Claude Code emits the `ai-title` event 5-10 seconds after the first user prompt), the plugin writes `\x1b]2;\x07` to the parent Claude Code process's controlling tty. VS Code's integrated terminal (and every standard terminal emulator) honors this in its tab title.
Platform coverage
| Platform | Mechanism | Status |
|---|---|---|
| Linux | Parse `/proc//stat` field 7 → `/dev/pts/` | ✓ |
| macOS | `ps -p -o tty=` → `/dev/` (no /proc) | ✓ |
| Windows | Requires Win32 `AttachConsole` + `WriteConsoleW` (or native helper) | not yet — silent no-op |
VS Code Extension chat tabs use their own internal rendering (read `ai-title` directly from CC) and don't need this feature.
Why this instead of Claude Code itself
Anthropic closed the upstream feature requests to emit OSC 2 from Claude Code:
- #21409 — Use OSC 2 escape sequences for terminal title — closed not planned
- #18326 — Propagate session name to terminal title — closed
The plugin already monitors `ai-title` events for peer-name purposes, so it's the natural place to emit OSC.
Opt-out
Set `CLAUDE_BRIDGE_EMIT_TERMINAL_TITLE=0` (or `false`) in the environment before starting Claude Code if you'd rather not have your tab titles overwritten by the plugin.
Verification
- 17 new unit tests in `tests/unit/terminal-title.test.ts` (tty_nr decoding edge cases, OSC file write, env opt-out, platform dispatch).
- 230/230 unit tests pass (up from 213).
- Typecheck clean, biome clean.
- Build size: `dist/bundle.cjs` 738.5 KB (+2.5 KB).
See CHANGELOG.md for the full record.
v0.5.5 — Windows push delivery fix
Patch release fixing real-time push delivery on Windows-native Claude Code.
Fixed
Windows push channel silently fell back to piggyback
Chokidar's default backend on Windows (`ReadDirectoryChangesW`) sporadically misses `ADD` events for files arriving via atomic `temp → rename`, especially with antivirus in the loop. Empirically confirmed:
- Sender writes message to receiver's `~/.claude-bridge/inbox//pending/.json`
- Receiver's chokidar watcher never fires on Windows
- Message gets delivered only via piggyback (next tool call), not inline as `` tag
- User starts Claude with `--channels`, sees `channels: enabled`, but feels like push doesn't work
Fix: force `usePolling: true` (200 ms interval) on Windows only. Linux/macOS keep native inotify/FSEvents — no regression. Polling adds at most ~200 ms latency vs. ~0 ms native, still orders of magnitude faster than waiting for the recipient's next tool call (which could be minutes if the agent is idle).
Why polling and not a smarter Windows backend
`ReadDirectoryChangesW` is the official native backend and has known atomic-rename event delivery gaps that aren't fixable from userland. Chokidar's docs explicitly recommend `usePolling` for reliability on Windows, especially with atomic writes (which we use throughout for inbox messages).
Verification
- 213/213 unit tests pass on all platforms.
- Behavior unchanged on Linux/macOS (native events).
- Windows behavior fixed (polling).
See CHANGELOG.md for the full record.