fix(tabby): detect idle long-context Claude + warn on outdated CLI#7
Draft
motin wants to merge 1 commit into
Draft
fix(tabby): detect idle long-context Claude + warn on outdated CLI#7motin wants to merge 1 commit into
motin wants to merge 1 commit into
Conversation
…ent-captured output Three connected fixes for the failure mode where `cctabs sessions` reports running Claude sessions as 'terminal' (or 'unknown'), most visibly in long-running tabs sitting on the "new task? /clear to save Nk tokens" prompt: - src/core/tabby.ts: add `new task?` and `Checking for updates` to the marker set. Idle Claude sessions with high context use only emit those two strings on redraw, so the startup banner and permission pill scroll out of the Tabby plugin's 256KB output ring. Verified live: tabs that previously reported `terminal` (incl. one at 304.7k tokens) now correctly show `● active`, while a real zsh tab stays `terminal`. - src/index.ts: when `update-notifier` finds a newer release, also write a plain `[cctabs] OUTDATED x.y.z < a.b.c — run: npm install -g ...@latest` line to stdout. The library's pretty banner is suppressed in non-TTY contexts (i.e. whenever Claude Code runs cctabs via a shell tool), so agent-driven users would otherwise never see "your binary is stale" even though the check ran. - skills/cctabs/SKILL.md: add a "Check the installed version isn't stale" step instructing the model to compare the version banner against the skill's plugin.json and to surface the new OUTDATED line. Calls out that the marketplace plugin update path only refreshes the skill — the npm-installed CLI binary is a separate channel and must be upgraded explicitly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Deploying cctabs with
|
| Latest commit: |
a283135
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://39aad341.cctabs.pages.dev |
| Branch Preview URL: | https://fix-tabby-idle-claude-detect.cctabs.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
new task?andChecking for updatesto the Tabby session-status markers. Idle Claude sessions with high context use only emit those strings on redraw, so the startup banner and permission pill scroll out of the plugin's 256 KB output ring and the detector falsely reportsterminal. Verified live against a workspace with ~15 sessions — every previously-misclassified tab (including one at 304.7k tokens) now reports● active; a real zsh tab still correctly reportsterminal.update-notifier's pretty banner, write a plain[cctabs] OUTDATED x.y.z < a.b.c — run: npm install -g ...@latestline to stdout. The library's banner is suppressed in non-TTY contexts, which is every cctabs invocation Claude Code makes via a shell tool — so without this, agent-driven users never see that their CLI is stale.plugin.json, surface the new OUTDATED line, and call out that the marketplace plugin update path doesn't refresh the npm-installed CLI binary.Why this matters
A user with
cctabs@0.3.0installed globally was readingv0.4.1docs from the freshly-updated marketplace plugin and seeingcctabs sessionsfalsely flag ~15 active Claude tabs asterminal/unknown. The two channels (plugin vs. CLI) drift silently — and even whenupdate-notifierdetected the gap, its banner was muted because Claude was capturing the output. The agent therefore had no signal to suggest an upgrade and instead chased a detector bug that the user had already fixed in a later release. The skill triage + stdout warning close that loop.Test plan
cctabs sessionsand confirm previously-misclassifiedterminal/unknowntabs now report● active. Real shell tabs should still reportterminal.npm run typecheck && npm run build— clean.package.jsonversion (ornpm install -g @generativereality/cctabs@0.3.0 && cctabs sessionsafter this release is published) and confirming the[cctabs] OUTDATED ...line appears on stdout in a non-TTY context (e.g. piped throughcat).🤖 Generated with Claude Code