Skip to content

fix(learnings): Claude tool_response/exitCode aliases (C2 multi-client hooks) - #6

Closed
AlexMikhalev wants to merge 2 commits into
mainfrom
task/learn-hook-claude-envelope-aliases
Closed

fix(learnings): Claude tool_response/exitCode aliases (C2 multi-client hooks)#6
AlexMikhalev wants to merge 2 commits into
mainfrom
task/learn-hook-claude-envelope-aliases

Conversation

@AlexMikhalev

Copy link
Copy Markdown
Contributor

Summary

Accept live Claude Code PostToolUse envelopes (tool_response + exitCode) so learn hook captures failures.

Test

cargo test -p terraphim_agent --bins test_hook_input_ → 4 ok

Host Phase 0

PATH agent 1.21.1; Claude post→learn hook; OpenCode terraphim-learn plugin.

Gitea PR: https://git.terraphim.cloud/terraphim/terraphim-clients/pulls/90

Live Claude Code PostToolUse sends tool_response + exitCode, not the
fixture tool_result + exit_code shape — learn hook fail-opened with
zero captures (#2704 / multi-client plan C2).

- serde alias tool_response → tool_result, exitCode → exit_code
- Auto format: normalize bash→Bash; legacy {tool,result} from #2704
- Unit tests for live Claude, lowercase bash, legacy sample

Host Phase 0 (separate): PATH agent 1.21.1, Claude post→learn hook,
OpenCode terraphim-learn plugin.
@AlexMikhalev

Copy link
Copy Markdown
Contributor Author

Merged on Gitea as #90 (b2d8907). GitHub main lagging private forge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant