Allow plugins to contribute to the status line via hook output
Summary
Plugins currently have no way to display persistent information in the status bar. The systemMessage field in hook output JSON injects text into the AI's context (useful!) but is invisible to the user. The statusLine setting in settings.json exists for user scripts, but plugins cannot contribute to it.
Use Case
I'm building context-daddy, a plugin that tracks cross-session goals. When a goal is active, I want to show a short status like:
🎯 Goal: Add auth (3/7) | ⏵⏵ accept edits
Currently the SessionStart hook can output systemMessage which goes into the AI's context - the AI can see the goal state, but the user can't see it in the status bar.
Proposed Solution
Allow hook output JSON to include a statusLine field that appends/sets text in the status bar:
{
"systemMessage": "...",
"statusLine": "🎯 Goal: Add auth (3/7)"
}
This could work from:
SessionStarthooks (set initial status)PostToolUsehooks (update status after actions)Stophooks (update after responses)
Alternative: Plugin-level statusLine config
Allow plugin.json to declare a statusLine command, similar to the user-level statusLine setting in settings.json:
{
"name": "my-plugin",
"statusLine": "${CLAUDE_PLUGIN_ROOT}/scripts/status.sh"
}
Current Workarounds
systemMessagein hook output: AI sees it, user doesn'tstderrfrom SessionStart: flashes briefly during startup, not persistent- Suggest users manually configure
statusLinein their settings: fragile, not portable
Environment
- Claude Code: v2.1.50
- OS: macOS (Darwin 24.6.0)
- Plugin: context-daddy v0.14.2
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗