Skip to content

fix(core): recover common tool-call argument and edit-match failures - #485

Merged
lg2m merged 5 commits into
mainfrom
feat/tool-call-recovery
Oct 27, 2026
Merged

lg2m merged 5 commits into
mainfrom
feat/tool-call-recovery

Conversation

@lg2m

@lg2m lg2m commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

Change

Plan section D: tool calls that used to fail now apply, or fail with a clearer error. I measured first on the newest build in the session store (prompt version 22, 334 runs, 2026-10-14 to 10-22; the store has no v0.1.9 runs) and fixed only the shapes that still occur:

  • if_hash / if_changed_since set to h:000000000000 now counts as no hash rather than a stale one (21 stale_file errors in 15 runs). An unread file still needs a read. Edit, write and read share one hash parser.
  • An edit whose old equals its new is skipped with note=identical_edit_skipped instead of failing the whole batch (17 errors in 11 runs). A batch of only such edits is still an error.
  • Edit matching:
    • A fuzzy match in a CRLF file writes CRLF.
    • Curly quotes, dashes and … match their ASCII forms (via=punctuation).
    • An old copied with read_file's line-number prefix is retried without it (via=line_numbers_stripped), and the prefix is stripped from new too.
  • update_goal accepts the checklist sent as a JSON string (5 errors in 4 runs).
  • The three copies of the stopped-shell result formatting are now one helper.

The shapes the plan listed ({} arguments, ranges with offset/limit, every insert field set) show 0 errors on that build. Two items were left out: a minimal valid call on the second identical error had only 1 back-to-back repeat, and edits sent as a string had 1 occurrence ever. The max_per_file error is kept, because an earlier commit pinned it as an error that tells the model the valid range.

Verification

  • Regression test per shape: zero_hash_placeholder_reads_as_absent (fails on main), an_identical_edit_is_skipped_and_the_rest_of_the_batch_applies, a_fuzzy_match_in_crlf_text_writes_crlf, typographic_punctuation_matches_its_ascii_form, a_copied_read_file_gutter_is_stripped_from_old_and_new, a_checklist_sent_as_a_json_string_decodes.
  • cargo xtask check: passed on the pushed head.

Known impact

  • Repeated same-error runs on that build are 1 of 334 (0.3%), against the plan's 9.6% baseline from older builds. Plan D's acceptance recount needs a week of v0.1.10 use.
  • docs/design/tools.md updated for the new strategies and notes.

lg2m added 5 commits October 27, 2026 12:43
…ne hash parser

Models with no hash fill if_hash and if_changed_since with zeros; on the
v0.1.8 build that was 21 stale_file errors in 15 runs. The placeholder is
now absent, and edit, write and read share one short-hash parser.
…matches, accept a string checklist

- An edit whose old equals its new is skipped with a note instead of failing
  the batch (17 errors in 11 v0.1.8 runs).
- Fuzzy matches in CRLF text write CRLF; curly quotes, dashes and ellipses
  match their ASCII forms; a copied read_file gutter is stripped.
- update_goal accepts the checklist JSON-encoded as a string (5 errors).
- One helper formats stopped shell results instead of three copies.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-27T20:53:24.977190Z ae20130 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@lg2m

lg2m commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: ae20130f45

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@lg2m
lg2m merged commit d9d740b into main Oct 27, 2026
7 checks passed
@lg2m
lg2m deleted the feat/tool-call-recovery branch October 27, 2026 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant