Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tool call hangs with error: Could not find file #4488

Closed
3 tasks done
Tracked by #3634
ferenci84 opened this issue Mar 5, 2025 · 1 comment · Fixed by #4628
Closed
3 tasks done
Tracked by #3634

Tool call hangs with error: Could not find file #4488

ferenci84 opened this issue Mar 5, 2025 · 1 comment · Fixed by #4628
Assignees
Labels
ide:vscode Relates specifically to VS Code extension kind:bug Indicates an unexpected problem or unintended behavior "needs-triage"

Comments

@ferenci84
Copy link
Contributor

ferenci84 commented Mar 5, 2025

Before submitting your bug report

Relevant environment info

- OS: MacOS
- Continue version: 1.2
- IDE version: VS code

To reproduce

In continue repository, PR 4426 commit id a15d116,

Model:

{
      "cacheBehavior": {
        "cacheConversation": true,
        "cacheSystemMessage": true
      },
      "title": "Anthropic - Claude 3.7 Sonnet (no tags, thinking 1024)",
      "model": "claude-3-7-sonnet-latest",
      "provider": "anthropic",
      "apiKey": "",
      "systemMessage": "You are intelligent, helpful and an expert developer, who always gives the correct answer and follow instructions.",
      "replaceSystemMessage": true,
      "completionOptions": {
        "temperature": 1,
        "topP": 0.999,
        "maxTokens": 32000,
        "reasoning": true,
        "reasoningBudgetTokens": 16000
      }
    },

Send the following prompt with attached files:
Attached files:
gui/src/redux/slices/sessionSlice.ts
gui/src/pages/gui/Chat.tsx

Prompt:

streamUpdate adds messages with role="thinking". These blocks are visible right now. contextItems of messages are not visible by default, but it drops down when clicked. I want thinking blocks to work the same way, hidden by default, showing only a title, and the user can click and it will drop down.

What happens

It hangs when it reads gui/src/components/StepContainer.tsx but will not find because it's under subdirectory and the correct path is: gui/src/components/StepContainer/StepContainer.tsx.

It results in error, but visible only in developer tools:

Error handling webview message: {
  "msg": {
    "messageId": "5f6e76d1-86ef-423f-8ad4-49e60daac02f",
    "messageType": "tools/call",
    "data": {
      "toolCall": {
        "id": "toolu_019nC8B8r9eYh7KmPQiEXdRt",
        "type": "function",
        "function": {
          "name": "builtin_read_file",
          "arguments": "{\"filepath\": \"gui/src/components/StepContainer.tsx\"}"
        }
      },
      "selectedModelTitle": "Anthropic - Claude 3.7 Sonnet (no tags, thinking 1024)"
    }
  }
}

Error: Could not find file gui/src/components/StepContainer.tsx

Correct behaviour

Automatically decline reading the file, as if the user has declined, with a reason if possible.

Log output

@ferenci84 ferenci84 changed the title Hangs when after tool call it doesn't find the file Tool call hangs with error: Could not find file Mar 5, 2025
@dosubot dosubot bot added ide:vscode Relates specifically to VS Code extension kind:bug Indicates an unexpected problem or unintended behavior labels Mar 5, 2025
@RomneyDa RomneyDa mentioned this issue Mar 11, 2025
24 tasks
@oxmb
Copy link

oxmb commented Mar 12, 2025

I have the exact same Problem:

Failed to call tool builtin_read_file: Could not find file src/app.py

And it's over. This error should be handled more gracefully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ide:vscode Relates specifically to VS Code extension kind:bug Indicates an unexpected problem or unintended behavior "needs-triage"
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants