[Feature Request] Hook output for dynamic tab title prefix/session label overlay

Resolved 💬 3 comments Opened Apr 21, 2026 by PM-Labs Closed Apr 24, 2026

Bug Description
Feature request: hook output for tab-title / session-label signaling ▎ ▎ Use case: users with multiple concurrent Claude Code sessions want visual state indication per tab (🟡 waiting / 🔵 deploying / 🔴 errored) so they can tell at a glance which terminal tab needs them without ▎ cycling through tabs. ▎ ▎ What I tried and why it doesn't work: ▎ ▎ 1. Windows Terminal tab color: WT only accepts tabColor at startup (settings.json / wt.exe --tabColor). No runtime OSC sequence is honored. Dead end. ▎ 2. SetConsoleTitleW via process.title / cmd /c title from a hook subprocess: the title change is immediately clobbered by Claude Code's render loop. Dead end. ▎ 3. Writing the name field into ~/.claude/sessions/<pid>.json: file write is a side effect of /rename, not a trigger — CC doesn't watch it. Dead end. ▎ 4. Hijacking /rename from a hook to inject the state emoji into the session name: works for the tab title but destroys meaningful user-set session labels, making past sessions hard to find. Not viable. ▎ ▎ What would unblock this cleanly: a field in hookSpecificOutput (Stop / Notification / PreToolUse / PostToolUse events) like: ▎ ▎ { "hookSpecificOutput": { "tabTitlePrefix": "🟡 " } } ▎ ▎ Rendered as prefix to the session name — so /rename Sales Coach B2 + hook prefix becomes 🟡 Sales Coach B2 in the tab, while the stored session name stays clean. Clears when the next hook returns ▎ empty/null. Equivalent: sessionLabelOverlay or similar naming. ▎ ▎ Today I have a Windows-only toast + chime hook working (plugin: pmin-claude, hook session-state-toast) but toasts don't identify which tab — they only say "Claude waiting", not "which Claude".

Environment Info

  • Platform: win32
  • Terminal: windows-terminal
  • Version: 2.1.114
  • Feedback ID: 1cb37fb0-8976-4add-ab9b-f52f2b50f6ee

Errors

[{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 211755 tokens > 200000 maximum\"},\"request_id\":\"req_011CaEioxkU6yMUmwetAi2Jv\"}\n    at generate (B:/~BUN/root/src/entrypoints/cli.js:11:52913)\n    at makeRequest (B:/~BUN/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-20T08:39:08.335Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 211755 tokens > 200000 maximum\"},\"request_id\":\"req_011CaEipZBf2gCHWh9QRCppi\"}\n    at generate (B:/~BUN/root/src/entrypoints/cli.js:11:52913)\n    at makeRequest (B:/~BUN/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-20T08:39:15.618Z"},{"error":"AxiosError: timeout of 5000ms exceeded\n    at <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:115:13344)\n    at emit (node:events:92:22)\n    at <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:114:3321)\n    at request (B:/~BUN/root/src/entrypoints/cli.js:117:2467)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-20T08:39:25.511Z"},{"error":"AxiosError: timeout of 5000ms exceeded\n    at <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:115:13344)\n    at emit (node:events:92:22)\n    at <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:114:3321)\n    at request (B:/~BUN/root/src/entrypoints/cli.js:117:2467)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-20T09:51:43.734Z"},{"error":"AxiosError: Request failed with status code 404\n    at hg (B:/~BUN/root/src/entrypoints/cli.js:110:1194)\n    at <anonymous> (B:/~BUN/root/src/entrypoints/cli.js:115:12744)\n    at emit (node:events:92:22)\n    at endReadableNT (internal:streams/readable:865:50)\n    at processTicksAndRejections (native:7:39)\n    at request (B:/~BUN/root/src/entrypoints/cli.js:117:2467)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-20T12:49:01.320Z"}]

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗