Skip to content

Conversation

@tonytrg
Copy link
Contributor

@tonytrg tonytrg commented Nov 17, 2025

GTP-5.1-Codex experienced a problem with get_file_contents. It ignored the instruction to add trailing slashes to directories. It looped multiple times before it recovered and added the trailing slashes.

The follow up error: file content SHA is nil usually means we are using the logic to look for a file but provided a path in reality. This improved error message should improve the feedback loop drastically for llms.

Closes:

@tonytrg tonytrg requested a review from a team as a code owner November 17, 2025 09:13
Copilot AI review requested due to automatic review settings November 17, 2025 09:13
Copilot finished reviewing on behalf of tonytrg November 17, 2025 09:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves error messaging for the get_file_contents tool to better guide LLM users when they encounter the "file content SHA is nil" error. The enhanced message now explicitly instructs users to add a trailing slash (/) when requesting directories, addressing confusion that occurred when GPT-5.1-Codex ignored these instructions.

  • Enhanced error message to include actionable guidance about trailing slashes for directory paths

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

3 participants