illogical inbox as a SessionStart hook holds headless claude -p forever #124

Closed
opened 2026-10-03 23:40:14 +00:00 by jhgaylor · 1 comment
Owner

Found in S24 (2026-10-03). With illogical's hooks in ~/.claude/settings.json, claude -p "say hi" (2.1.289) never answers: the SessionStart hook illogical inbox (asyncRewake, timeout 86400) is waited on in print mode, and the run ends with 'No messages returned from query' when killed. --setting-sources project,local answers in 4.6 s. The same happens through claude-agent-acp when a client's _meta.claudeCode.options doesn't set settingSources: [] (illogical's own blocks do, so they're fine).

Fix: illogical inbox should return at once when the session isn't one a person drives (print/SDK entrypoints, e.g. CLAUDE_CODE_ENTRYPOINT, or the hook input), or SessionStart shouldn't use it. Test: claude -p with the installed hooks answers. Part of the Fountain track run (BRIEF-fountain.md).

Found in S24 (2026-10-03). With illogical's hooks in ~/.claude/settings.json, `claude -p "say hi"` (2.1.289) never answers: the SessionStart hook `illogical inbox` (asyncRewake, timeout 86400) is waited on in print mode, and the run ends with 'No messages returned from query' when killed. `--setting-sources project,local` answers in 4.6 s. The same happens through claude-agent-acp when a client's `_meta.claudeCode.options` doesn't set `settingSources: []` (illogical's own blocks do, so they're fine). Fix: `illogical inbox` should return at once when the session isn't one a person drives (print/SDK entrypoints, e.g. CLAUDE_CODE_ENTRYPOINT, or the hook input), or SessionStart shouldn't use it. Test: `claude -p` with the installed hooks answers. Part of the Fountain track run (BRIEF-fountain.md).
Author
Owner

Merged. illogical inbox exits 0 at once when CLAUDE_CODE_SESSION_ATTENDED=0, or, when that's unset, when the entrypoint starts with sdk-. With the hooks installed, claude -p answered in 4.5 s; the old build was still waiting at the 40 s timeout. macOS CI timed out twice on team_answers (a permission-hook test). On jake-mini, run directly, it passes every time on both main and this branch (about 5 s), so it's a timing flake under CI load.

Merged. `illogical inbox` exits 0 at once when `CLAUDE_CODE_SESSION_ATTENDED=0`, or, when that's unset, when the entrypoint starts with `sdk-`. With the hooks installed, `claude -p` answered in 4.5 s; the old build was still waiting at the 40 s timeout. macOS CI timed out twice on team_answers (a permission-hook test). On jake-mini, run directly, it passes every time on both main and this branch (about 5 s), so it's a timing flake under CI load.
Commenting is not possible because the repository is archived.
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jhgaylor/illogical#124
No description provided.