fix: prevent unnecessary read_file("BOOT.md") in boot hook - #8696
Closed
malaiwah wants to merge 1 commit into
Closed
fix: prevent unnecessary read_file("BOOT.md") in boot hook#8696malaiwah wants to merge 1 commit into
malaiwah wants to merge 1 commit into
Conversation
The boot prompt said "Follow the BOOT.md instructions below" which
led models to interpret "BOOT.md" as a file reference and call
read_file("BOOT.md") — wasting a tool call that either reads a
file already injected inline, or fails with "File not found" in
sandboxed deployments where the file doesn't exist.
Fix: explicitly tell the model the file has already been read and
its contents are provided below. Saves one tool call per boot.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
malaiwah
force-pushed
the
upstream/fix/boot-md-no-read-file
branch
from
April 13, 2026 00:37
cf92dbc to
94513f4
Compare
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The boot prompt says "Follow the BOOT.md instructions below" which leads models to interpret "BOOT.md" as a file reference and call
read_file("BOOT.md")— wasting a tool call that either reads content already injected inline, or fails with "File not found" in sandboxed deployments where the gateway's BOOT.md isn't accessible.Fix: explicitly tell the model the file has already been read:
Observed via MITM proxy: the boot agent makes
read_file("BOOT.md")→ "File not found" →search_files("BOOT.md")→ "ripgrep not found" before finally processing the inline content. Two wasted tool calls per gateway restart.