-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Description
Summary
When opening a single file in Zed, the agent is unable to find the project directory, and believes the file itself is a directory.
Description
Steps to trigger the problem:
- Create a “Hello world” bash script at
~/bin/test - Open the file:
zed ~/bin/test - Using the “Write” profile, ask the agent to execute the script and return its output with this prompt:
This file is a bash script named `test`. Please execute the file and provide me with its contents.
Expected Behavior: The agent will execute ~/bin/test and return its output (“Hello world”).
Actual Behavior: The agent thinks ~/bin/test is a directory, and you will see cd: /Users/q/bin/test: Not a directory errors.
I'm guessing the problem may be caused by opening Zed with a single file, rather than opening a “project directory”. The agent was designed to work in the context of a project directory, and isn't makes the assumption that the path provided to it is a directory, rather than a single file.
This issue is important for me, because I often edit single file scripts from my ~/bin/ directory and want the agent to be able to modify the file and execute it.
Model Provider Details
- Provider: Anthropic via API key
- Model Name: Sonnet 4 Thinking
- Mode: Agent Panel
- Other Details: using Write profile with default tools.
Zed Version and System Specs
Zed: v0.190.6 (Zed)
OS: macOS 15.5.0
Memory: 32 GiB
Architecture: aarch64