Environment
- Droid CLI version: 0.70.0
- OS: macOS (darwin 25.3.0)
- Shell: zsh
Description
According to the hooks reference documentation, the SessionStart event should support a "compact"
matcher that fires after auto or manual compaction:
Matchers:
startup - Invoked from startup
resume - Invoked from --resume, --continue, or /resume
clear - Invoked from /clear
compact - Invoked from auto or manual compact
However, the SessionStart hook with "matcher": "compact" never fires after compaction.
Configuration
{
"hooks": {
"SessionStart": [
{
"matcher": "compact",
"hooks": [
{
"type": "command",
"command": "python3 ~/.factory/hooks/compact-reinject.py AGENTS.md",
"timeout": 10
}
]
}
]
}
}
Steps to Reproduce
- Configure a SessionStart hook with "matcher": "compact" as shown above
- Start a Droid session and work until auto-compaction triggers (or use /compact)
- Check session logs for hook execution
Expected Behavior
After compaction, the SessionStart hook with "compact" matcher should fire, and the hook's output should be injected into context.
Actual Behavior
• The compaction_state event appears in session logs
• No SessionStart hook fires after compaction
• No hook output (e.g., additionalContext) is injected
Session log analysis shows:
- compaction_state entry exists with timestamp
- Next message after compaction has NO hook output injected
- The expected [RE-INJECTED AFTER COMPACTION: ...] context never appears
Environment
Description
According to the hooks reference documentation, the
SessionStartevent should support a"compact"matcher that fires after auto or manual compaction:
However, the
SessionStarthook with"matcher": "compact"never fires after compaction.Configuration
{ "hooks": { "SessionStart": [ { "matcher": "compact", "hooks": [ { "type": "command", "command": "python3 ~/.factory/hooks/compact-reinject.py AGENTS.md", "timeout": 10 } ] } ] } }Steps to Reproduce
Expected Behavior
After compaction, the SessionStart hook with "compact" matcher should fire, and the hook's output should be injected into context.
Actual Behavior
• The compaction_state event appears in session logs
• No SessionStart hook fires after compaction
• No hook output (e.g., additionalContext) is injected
Session log analysis shows: