mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-03-30 13:43:26 +08:00
fix: read tool_response field in observe.sh (#377)
Claude Code sends tool output as `tool_response` in PostToolUse hook payloads, but observe.sh only checked for `tool_output` and `output`. This caused all observations to have empty output fields, making the observer pipeline blind to tool results. Adds `tool_response` as the primary field to check, with backward- compatible fallback to the existing `tool_output` and `output` fields.
This commit is contained in:
@@ -124,7 +124,7 @@ try:
|
||||
# Extract fields - Claude Code hook format
|
||||
tool_name = data.get("tool_name", data.get("tool", "unknown"))
|
||||
tool_input = data.get("tool_input", data.get("input", {}))
|
||||
tool_output = data.get("tool_output", data.get("output", ""))
|
||||
tool_output = data.get("tool_response", data.get("tool_output", data.get("output", "")))
|
||||
session_id = data.get("session_id", "unknown")
|
||||
tool_use_id = data.get("tool_use_id", "")
|
||||
cwd = data.get("cwd", "")
|
||||
|
||||
Reference in New Issue
Block a user