altimate-code icon indicating copy to clipboard operation
altimate-code copied to clipboard

fix: tool reliability improvements for sql-classify, edit, and webfetch

Open anandgupta42 opened this issue 8 months ago • 0 comments

Problem

Three tool reliability issues affecting agent effectiveness:

  1. sql-classify.ts: computeSqlFingerprint references undefined core variable after safe-import refactor, silently breaking fingerprinting. Fallback classifier defaults to "read" for unknown statements (should be "write" for safety). Fallback doesn't handle multi-statement SQL.

  2. edit.ts: When oldString not found, error message provides no context for self-correction. Substring matching in buildNotFoundMessage can latch onto short irrelevant lines.

  3. webfetch.ts: No caching of failed URLs — agent retries 404s repeatedly. Error messages don't tell the model whether to retry. URLs with auth tokens in query strings leak into error messages.

Expected Behavior

  • sql-classify should gracefully degrade with correct security guarantees in fallback mode
  • Edit tool should provide nearest-match snippets to help the model self-correct
  • Webfetch should cache permanent failures and provide actionable error messages

anandgupta42 avatar Mar 30 '26 01:03 anandgupta42