Skip to content

Conversation

@ashwin-ant
Copy link
Collaborator

Fixes critical bug where hook outputs using async_ and continue_ (Python-safe names avoiding keyword conflicts) were not being converted to async and continue as expected by the CLI. This caused hook control fields like {"decision": "block"} or {"continue_": False} to be silently ignored.

Changes:

  • Add _convert_hook_output_for_cli() to handle field name conversion
  • Apply conversion in hook callback handling
  • Update type documentation to clarify field name usage
  • Add comprehensive test coverage for field name conversion
  • Update existing tests to verify conversion occurs correctly

🤖 Generated with Claude Code

Fixes critical bug where hook outputs using `async_` and `continue_`
(Python-safe names avoiding keyword conflicts) were not being converted
to `async` and `continue` as expected by the CLI. This caused hook
control fields like `{"decision": "block"}` or `{"continue_": False}`
to be silently ignored.

Changes:
- Add _convert_hook_output_for_cli() to handle field name conversion
- Apply conversion in hook callback handling
- Update type documentation to clarify field name usage
- Add comprehensive test coverage for field name conversion
- Update existing tests to verify conversion occurs correctly

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@ashwin-ant ashwin-ant requested a review from a team October 10, 2025 16:58
@ashwin-ant ashwin-ant merged commit 48b62a0 into main Oct 10, 2025
26 checks passed
@ashwin-ant ashwin-ant deleted the ashwin/hookfix branch October 10, 2025 17:25
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.

3 participants