Skip to content

Conversation

@alvis-HaoH
Copy link

Related Issue

Resolve #(174)

Description

  • Introduce a session-scoped FileOpsWindow that tracks which files have been read via ReadFile.
  • Inject the shared window through the agent runtime so every file tool instance shares the same state.
  • Update ReadFile to mark files as read after a successful call, and make PatchFile/StrReplaceFile refuse edits unless
    the file was read earlier in the session.
  • Refine user-facing docs to call out the new “read before edit” requirement and expand pytest coverage for both happy-path and failure scenarios.

Testing

  • uv run pytest tests/test_patch_file.py tests/test_str_replace_file.py -vv

@alvis-HaoH alvis-HaoH changed the title Enforce Read prerequisite for patch/replace tools Refactor: Enforce Read prerequisite for patch/replace tools Nov 7, 2025
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