Skip to content

[FEATURE] Read suggests nearby files on NOT_FOUND and the repeated-failure guard ignores argument noise #1453

Description

@edenreich

Summary

Two small changes so a wrong path stops costing a whole session. In one run on 2026-10-01 the agent called Read 51 times on internal/tools/A2A_QueryAgent.yaml, which does not exist (the manifest is in internal/protocols/a2a/tools/), and never succeeded.

  • Read returns a bare NOT_FOUND: <path> (internal/tools/read.go:193). Edit already lists near matches on a failed old_string (internal/tools/edit.go:359-369). Read should do the same for the path: list the siblings of the nearest existing parent directory, or files with a similar base name.
  • The repeated-failure reminder (internal/agent/agent.go:1806-1830, config/reminders.go:80) keys on name + raw arguments string. Any change in offset, limit, key order or whitespace starts a fresh count, so near-identical retries never reach the threshold of 3. The key should normalise the arguments, for example the file path only for Read, and the sorted canonical JSON for other tools.

Acceptance Criteria

  • A Read on a missing path returns NOT_FOUND plus up to a handful of candidate paths from the nearest existing directory or by similar name
  • The repeated-failure counter keys on normalised arguments so retries that only change offset, limit or key order count as the same failure
  • Tests cover both behaviours

Activity

  1. added
    enhancement
    on Oct 1, 2026
  2. added theissue type on Oct 1, 2026
  3. self-assigned this
    on Oct 1, 2026
  4. inference-gateway-releaser commented on Oct 2, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.222.0 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

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

Metadata

Metadata

Assignees

Labels

enhancementreleased

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions