Skip to content

pre-edit-recall: most recorded runs have no file_path in the tool input #370

Open

Description

@kevintseng

What happens

In the most recent 22 recorded pre-edit-recall outcomes on a real machine (2026-09-20), 13 are skipped / no file_path in the tool input, 6 are nothing to recall and 3 are notified.

hooks/hooks.json registers the hook with matcher: "Edit|Write". A plain Edit or Write always carries file_path, so something else is matching. Not verified which tool: the outcome record does not store the tool name. Candidates are tools whose NAME contains Edit or Write if the host treats the matcher as an unanchored regular expression (TodoWrite, NotebookEdit — which uses notebook_path — or an MCP tool with write in its name).

Each such run pays a process spawn and an outcome line for nothing, and returns before the guard pass — so if one of those tools can carry content a guard should see, it is not evaluated.

Suggested direction

  • Record tool_name on the outcome line so this can be answered from data.
  • Anchor the matcher if the host supports it, or return early (without an outcome line, or with a distinct reason) for tool names the hook does not handle.
  • Decide whether NotebookEdit should be supported (notebook_path).

Activity

  1. kevintseng commented on Dec 2, 2026

    @kevintseng
    CollaboratorAuthor

    Remaining scope: use the bounded tool classification in #650 to identify an actual missing-path event before changing the matcher. The historical sample did not record the tool that triggered it.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions