claude-tab-tracking
中文文档
Know what every Claude Code session is doing — at a glance.

Live task tracking for Claude Code. Shows what each session is working on — updated automatically as the conversation progresses.
If you run multiple Claude Code sessions simultaneously, this tells you at a glance what each one is doing.
What it looks like
[WIP] Fix authentication bug in api/routes.py
[DONE] Deploy model to production server
[DONE] Refactor database schema
my-project | ctx 14% | 23min
Status badges:
[---] — session just started, showing directory and git branch
[WIP] — task in progress, auto-updated each turn
[DONE] — task completed (detected automatically)
[SET] — task manually set with /tabtrack:task
When you finish one task and start another, the previous tasks stay visible as dimmed [DONE] lines beneath the current task (up to 2 previous tasks displayed, 3 stored).
How it works
Five Claude Code hooks work together:
| Hook | What it does |
|---|
SessionStart | Writes dir [branch] as the initial label (kept on resume/compact); refreshes the statusline launcher |
Stop | After each assistant response: reads the transcript, updates the task description, detects completion |
SubagentStop | Files a finished subagent (type, description, duration) under the current task in today's memo |
Notification | Optional desktop notification carrying the session's task (off by default) |
SessionEnd | Cleans up session state files |
Completion is detected from the conversation itself (the summarizer marks a task [完成]/done), not from Claude Code's TaskCompleted event, which fires for individual background tasks rather than the session.
The statusline script reads the task file for the current session and renders the display.
Summarization backends
The plugin picks the best available backend automatically:
| Priority | Backend | Quality | Speed | Cost |
|---|
| 1 | Anthropic API (plugin option anthropic_api_key; ANTHROPIC_API_KEY for manual installs) | Best | ~2s | ~$1/month |
| 2 | Ollama (local model running) | Good | ~2s | Free |
| 3 | Claude Code CLI (Max subscription) | Best | ~10s (async) | Included in subscription |
| 4 | Keyword heuristics | Basic | instant | Free |
No setup needed — it works out of the box with any of the above.
Choosing a backend
Set the CLAUDE_TAB_BACKEND environment variable to pick a specific backend:
# Use only Claude Code CLI (Max subscription, no API key needed)
export CLAUDE_TAB_BACKEND=cli
# Use only the Anthropic API (set the anthropic_api_key plugin option first)
export CLAUDE_TAB_BACKEND=api
# Use only local Ollama
export CLAUDE_TAB_BACKEND=ollama
# Use only keyword heuristics (zero network calls)
export CLAUDE_TAB_BACKEND=keyword
# Auto-detect best available (default)
export CLAUDE_TAB_BACKEND=auto
When set to a specific backend, no fallback is attempted — if that backend fails, the task description is not updated. When set to auto (or unset), all backends are tried in order.
Token Budget
Control how much context /tabtrack:recall injects and how memo entries are deduplicated.
Add to ~/.claude/memos/config.yaml:
# Max tokens loaded per /tabtrack:recall invocation (default: 8000, 0 = unlimited)
recall_token_budget: 8000
# Merge similar memo entries within this window in seconds (default: 300, 0 = disabled)
memo_merge_window: 300
# Title similarity threshold for merging (0.0-1.0, default: 0.6)
memo_merge_threshold: 0.6
Recall loading modes:
- Full: file fits within budget → loaded as-is
- Summary: file exceeds budget → only headers + conclusions loaded
- Truncated: summary exceeds budget → most recent entries loaded up to budget
Override per-invocation: /tabtrack:recall --budget 4000 or /tabtrack:recall --full (no limit).
Install
Requires jq (brew install jq on macOS, apt install jq on Debian/Ubuntu) and Python 3 (preinstalled on macOS and most Linux).
From the plugin marketplace (recommended)
Inside Claude Code:
/plugin marketplace add lightpointventures/claude-tab-tracking
/plugin install claude-tab-tracking@claude-tab-tracking
/tabtrack:setup
Or from your shell:
claude plugin marketplace add lightpointventures/claude-tab-tracking
claude plugin install claude-tab-tracking@claude-tab-tracking
then run /tabtrack:setup once inside Claude Code. Plugins cannot change the statusLine setting themselves, so that command writes it for you (with a backup of settings.json). Task tracking and memos are active as soon as the plugin is installed; /tabtrack:setup only controls what you see.