Skip to content llms.txt

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

ProviderSupportedMechanism
claude-codeCommand hooks receive event JSON on stdin; respond with JSON on stdout (exit 0); structured fields: continue, stopReason, suppressOutput, systemMessage, hookSpecificOutput
clineHooks 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
codexCodex 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
crushHooks 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.
cursorCommand hooks receive event data as JSON on stdin and may return structured JSON on stdout to signal decisions and supply output fields.
factory-droidHooks 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-clihook_io_protocol: Gemini CLI hooks receive event data as JSON on stdin and return structured JSON responses on stdout
windsurfjson_stdin_context: Windsurf hooks receive event context as JSON on stdin
ampAmp hooks signal decisions via exit codes and declarative action types; no JSON stdin/stdout protocol documented
copilot-cliCopilot CLI hooks communicate via exit codes; no JSON stdin/stdout protocol documented
kiroKiro hooks communicate via exit codes; no JSON stdin/stdout protocol documented
opencodenot documented
piPi hooks communicate via TypeScript extension API; no JSON stdin/stdout protocol for shell hooks
roo-codenot documented
zednot documented