-
-
Notifications
You must be signed in to change notification settings - Fork 708
Description
Description
Running npx aios-core@latest install registers precompact-session-digest.cjs as a UserPromptSubmit hook in .claude/settings.local.json, but the runner file it depends on does not exist in the installed version.
Screenshot
The error appears on every single user input in Claude Code:
/AIOS:agents:devops→UserPromptSubmit hook error
Steps to Reproduce
- Run
npx aios-core@latest installon a project - Open Claude Code in the project
- Type any prompt (e.g.,
/AIOS:agents:devops)
Expected Behavior
No hook error should appear on every user input.
Actual Behavior
Every prompt shows:
⎿ UserPromptSubmit hook error
This happens on every single input, not just once, severely impacting UX.
Root Cause
The hook at .claude/hooks/precompact-session-digest.cjs requires:
.aios-core/hooks/unified/runners/precompact-runner.js
This file does not exist in the installed package. The hook logs the error to stderr:
[PreCompact Hook] Failed to load hook runner: Cannot find module '/path/to/.aios-core/hooks/unified/runners/precompact-runner.js'
Additionally, this hook appears to be intended for the PreCompact event, not UserPromptSubmit — it runs unnecessarily on every user input.
Generated settings.local.json (relevant section)
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "node \".claude/hooks/synapse-engine.cjs\""
}
]
},
{
"hooks": [
{
"type": "command",
"command": "node \"$CLAUDE_PROJECT_DIR/.claude/hooks/precompact-session-digest.cjs\"",
"timeout": 10
}
]
}
]Workaround
Remove the second hook entry from UserPromptSubmit in .claude/settings.local.json.
Suggestion
Either:
- Don't register the
precompact-session-digesthook during install until the runner is shipped - Or ship the
precompact-runner.jsfile with the install - Or add a file-existence check in the hook before attempting
require()
Environment
- AIOS Core version: 4.31.1 (installed via
npx aios-core@latest) - Platform: macOS (Darwin 24.6.0)
- Node.js: 18+
- Claude Code: latest