"What was I working on in that other terminal?"
AI-generated topic summaries for your Claude Code sessions. See what each session is about at a glance.
# Inside Claude Code
/plugin marketplace add dreamiurg/claude-session-topics
/plugin install claude-session-topics@dreamiurg
# Restart Claude Code, then configure your status line
/claude-session-topics:setup-statuslineThat's it. Topics appear automatically after a few messages.
To force a topic refresh anytime:
/claude-session-topics:regenerate-topicTopics follow a <theme>: <activity> format with a circle progress indicator:
◔ OAuth debug: fixing validation
◑ Blog post: adding snippets
◕ API refactor: updating endpoints
The circle shows progress toward the next topic refresh:
- ○ (empty) → ◔ → ◑ → ◕ → ● (full)
Topics generate using an adaptive schedule:
- Messages 1, 2, 3, 5, 8: Early updates while context develops
- Every 10 messages after that: Regular refreshes
Generation happens in the background (<50ms overhead) using Claude Haiku to summarize your session.
| Variable | Default | Description |
|---|---|---|
CLAUDE_TOPIC_THRESHOLD |
10 |
Messages between regeneration |
CLAUDE_TOPIC_CONTEXT_LINES |
100 |
Transcript lines to analyze |
CLAUDE_TOPIC_MAX_CHARS |
50 |
Max topic length |
CLAUDE_TOPIC_DEBUG |
0 |
Enable debug logging |
"waiting for conversation" — Normal. Need a few messages for context.
Topics not showing? — Run export CLAUDE_TOPIC_DEBUG=1 and check stderr.
- Claude Code CLI
- Bun 1.0+ or Node.js 18+
A stop hook fires after each Claude response, triggering topic-generator. Every N messages, it spawns a background process that:
- Pulls context from claude-mem (if available) or parses the transcript
- Sends it to Haiku with a summary prompt
- Writes to
$TMPDIR/claude-topic-<session_id>.json
topic-display reads the state file and outputs the topic with progress indicator. session-cleanup removes temp files when the session ends.
For the full story: Session Topic Summaries in Claude Code Status Line
- Bun 1.0+
- TypeScript 5.7+
bun install
bun run buildbun test
bun run test:watch # Watch modebun run lintBuilt by @dreamiurg because remembering context shouldn't require context.
