Skip to content

fix: emit actual changed paths from file tools #565

Description

@LeXwDeX

Why

FileChanged reads file_path/path although native write/edit use filePath, so successful writes emit a payload with no path. Multi-file apply_patch also needs accurate events.

Scope

Derive paths/change kinds from actual tool inputs and result metadata after successful execution, including rewritten input and multiple changed files.

Approach

The complete SessionPrompt regression additionally reproduced missing SettingsHook service context across SessionRunState tool execution. Preserve the captured hook service at that boundary and bind handler dependencies at construction, so real model-driven writes and patches emit events through the same path as isolated tools tests.

Turn the audit reproduction into a repository regression, fix the runtime boundary, and verify callers and adjacent hooks tests using Bun 1.3.14. Keep the user's existing working-tree edits outside this delivery.

Acceptance

Real write/edit and multi-file patch results emit correct nonempty paths and change kinds, and failed or blocked tools emit no false change.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions