Skip to content

bug: 2.0 changed command names #3750

@throwaway8787

Description

@throwaway8787

Checks

Operating system

linux

Expected behaviour

hook scripts written against 1.x continue to work

Actual behaviour

1.x:

{"hook_event_name":"preToolUse","cwd":"/home/jjshoe/wickfire/iac","session_id":"752f697f-8e63-4de7-bab9-2d5d1597c4a6","tool_name":"write","tool_input":{"command":"str_replace","oldStr":"b","newStr":"c","path":"/tmp/a"}}

2.0

{"hook_event_name":"preToolUse","cwd":"/home/jjshoe/wickfire/iac","session_id":"752f697f-8e63-4de7-bab9-2d5d1597c4a6","tool_name":"write","tool_input":{"command":"strReplace","oldStr":"b","newStr":"c","path":"/tmp/a"}}

No note was added to the changelog about this, and this breaking change then allowed my agent to go nuts since I use a hook against the tool_name of write to stop kiro from making rogue unasked for edits, it immediately started running amok on my system

Steps to reproduce

No response

Environment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions