json_io_protocol
Whether hooks communicate with the host via structured JSON on stdin/stdout rather than plain text or exit codes alone.
Type: bool Content type: hooks
Provider Support
Section titled “Provider Support”| Provider | Supported | Mechanism |
|---|---|---|
| claude-code | ✓ | Command hooks receive event JSON on stdin; respond with JSON on stdout (exit 0); structured fields: continue, stopReason, suppressOutput, systemMessage, hookSpecificOutput |
| cline | ✓ | Hooks receive a JSON object via stdin (taskId, hookName, clineVersion, timestamp, workspaceRoots, userId, model, plus hook-specific fields) and return JSON to stdout with cancel (bool), contextModification (string), and errorMessage (string); debug output goes to stderr |
| codex | ✓ | Codex hooks communicate via structured JSON on stdin (typed per-event payload conforming to the event input schema) and stdout (typed response conforming to the event output schema); exit codes alone are not the protocol |
| crush | ✓ | Hooks receive a JSON object on stdin containing tool name and parameters. The hook subprocess may return a JSON object with decision (allow/deny/none) and optional context fields. |
| cursor | ✓ | Command hooks receive event data as JSON on stdin and may return structured JSON on stdout to signal decisions and supply output fields. |
| factory-droid | ✓ | Hooks receive JSON via stdin containing session_id, transcript_path, cwd, permission_mode, hook_event_name, and event-specific fields; hooks return JSON output with continue, stopReason, suppressOutput, systemMessage, and event-specific fields |
| gemini-cli | ✓ | hook_io_protocol: Gemini CLI hooks receive event data as JSON on stdin and return structured JSON responses on stdout |
| windsurf | ✓ | json_stdin_context: Windsurf hooks receive event context as JSON on stdin |
| amp | ✗ | Amp hooks signal decisions via exit codes and declarative action types; no JSON stdin/stdout protocol documented |
| copilot-cli | ✗ | Copilot CLI hooks communicate via exit codes; no JSON stdin/stdout protocol documented |
| kiro | ✗ | Kiro hooks communicate via exit codes; no JSON stdin/stdout protocol documented |
| opencode | ✗ | not documented |
| pi | ✗ | Pi hooks communicate via TypeScript extension API; no JSON stdin/stdout protocol for shell hooks |
| roo-code | ✗ | not documented |
| zed | ✗ | not documented |