-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Labels
Description
Summary
Display context window usage on task cards and in the task header by querying Claude Code's /context command via hooks.
Context
Dash has no visibility into context usage. Claude Code handles compaction internally and exposes context info via the /context slash command. This can be queried programmatically through the PTY on each agent turn without disrupting the user.
Implementation
- Query context usage by sending
/contextthrough the PTY, triggered asynchronously via hooks (e.g., on each Stop hook callback) - Parse the structured output to extract token count / percentage
- Display a context usage indicator (token count or percentage bar) on task cards and in the task header
- Visual warning when context is running high, cueing users to start a new conversation or trigger
/compact - Surface compaction events in the task's activity timeline
References
- Inspired by pi.dev's visual context limit indicators and auto-compaction
- See
docs/pidev-feature-analysis.md§6
Reactions are currently unavailable