Skip to content

fix: tool error handling - V1 errors not silent, proper error propagation, read-before-edit enforcement#31892

Closed
LifetimeVip wants to merge 6 commits into
anomalyco:devfrom
LifetimeVip:fix/tool-errors
Closed

fix: tool error handling - V1 errors not silent, proper error propagation, read-before-edit enforcement#31892
LifetimeVip wants to merge 6 commits into
anomalyco:devfrom
LifetimeVip:fix/tool-errors

Conversation

@LifetimeVip

@LifetimeVip LifetimeVip commented Jun 11, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #30853 #30863 #30867 #31772

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Fix V1 tool errors silently swallowed by Effect.orDie, Question tool bypassing read-before-edit, read.ts using Effect.die instead of Effect.fail, and edit.ts oldString error missing file content.

How did you verify your code works?

Tested in custom fork with verified before/after behavior.

Screenshots / recordings

N/A - logic change, not UI

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Also adjust V2 toModelOutput format to prevent bypassing read-before-edit
#30784 - build-switch.txt: add re-read before edit instruction
#30792 - anthropic.txt + default.txt: add read-before-edit rule
#30867 - read.ts: replace Effect.die with Effect.fail for proper error propagation
- subagent-permissions.ts: forward ALL deny rules not just edit
- tool.ts: catch thrown Errors as ToolFailure instead of crashing session
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@LifetimeVip

Copy link
Copy Markdown
Author

@thdxr @jlongster @rekram1-node @simonklee @Hona these 8 PRs together fix 30 open issues (compaction context loss, Windows encoding, tool error handling, security, etc.). All are mergeable with no conflicts. Would appreciate a review when you have time.

@simonklee simonklee closed this Jun 11, 2026
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.

[BUG]: Question tool bypasses read-before-edit -- no runtime enforcement

2 participants