-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Description
Currently iloom-hook.js is fire-and-forget (broadcast only). To enable cross-loom permission approval from iloom-vscode, we need bidirectional communication.
Current Behavior
- Hook receives event from Claude Code
- Broadcasts to all
/tmp/iloom-*.socksockets - Closes connection immediately
New Behavior for PermissionRequest
When ILOOM_BIDIRECTIONAL_HOOK=1 is set:
- Hook receives
PermissionRequestevent - Connects to socket and sends event
- Keeps socket open, waits for response
- Receives
{"decision": "allow"}or{"decision": "deny"} - Returns decision to Claude Code via stdout
When flag is NOT set:
- Existing fire-and-forget behavior (backwards compatible)
Changes Required
templates/hooks/iloom-hook.js:
- Check for
ILOOM_BIDIRECTIONAL_HOOKenv var - For
PermissionRequestevents + flag set: keep socket open, wait for response - Return decision to Claude Code
src/utils/claude.ts (launchClaude):
- Set
ILOOM_BIDIRECTIONAL_HOOK=1env var when launching Claude
ClaudeHookManager.ts:
- Set timeout to 86400 seconds for PermissionRequest hook
Companion Issue
iloom-vscode: iloom-ai/iloom-vscode#66
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
No status