Continue list filesystem root folder instead of project folder
Before submitting your bug report
- [ ] I've tried using the "Ask AI" feature on the Continue docs site to see if the docs have an answer
- [ ] I'm not able to find a related conversation on GitHub discussions that reports the same bug
- [x] I'm not able to find an open issue that reports the same bug
- [x] I've seen the troubleshooting guide on the Continue Docs
Relevant environment info
- OS: Fedora Linux 42
- Continue version: 1.3.28 (vscode), 1.2.11 (vscode), 1.0.55 (IDEA)
- IDE version: 1.106.3 (vscode), 2025.2.6 (IDEA)
- Model: qwen3-coder:latest
- config:
name: Local Config
version: 1.0.0
schema: v1
models:
- name: qwen3-coder
provider: ollama
model: qwen3-coder
roles:
- chat
- edit
- apply
- rerank
- autocomplete
OR link to agent in Continue hub:
Description
No response
To reproduce
Continue fails to explore project. when it tries to list files in the project it lists filesystem root.
simple steps to reproduce:
query in agent mode:
which is the main file in this project?
it will get toolcall like this
Continue listed files in .
but when clicked on the details it opens the window with root folder content
afs/
bin/
dev/
etc/
lib/
mnt/
opt/
run/
srv/
sys/
tmp/
usr/
var/
boot/
home/
proc/
root/
sbin/
lib64/
media/
lost+found/
it should not list files int root folder, it should only access files id current project folder. reproducable both in VSCode and IntelliJ
Log output
last 100 lines of prompt.log
],
"properties": {
"query": {
"type": "string",
"description": "The search query to use. Must be the exact string to be searched or a valid ripgrep expression. Use regex with alternation (e.g., 'word1|word2|word3) or character classes to find multiple potential words in a single search."
}
}
}
},
"defaultToolPolicy": "allowedWithoutPermission",
"systemMessageDescription": {
"prefix": "To perform a grep search within the project, call the grep_search tool with the query pattern to match. For example:",
"exampleArgs": [
[
"query",
".*main_services.*"
]
]
},
"toolCallIcon": "MagnifyingGlassIcon"
}
],
"reasoning": false
}
Role: system
| <important_rules>
| You are in agent mode.
|
| If you need to use multiple tools, you can call multiple read-only tools simultaneously.
|
| Always include the language and file name in the info string when you write code blocks.
| If you are editing "src/main.py" for example, your code block should start with '
. src/main.py'
|
|
| For larger codeblocks (>20 lines), use brief language-appropriate placeholders for unmodified
. sections, e.g. '// ... existing code ...'
|
| However, only output codeblocks for suggestion and demonstration purposes, for example, when
. enumerating multiple hypothetical options. For implementing changes, use the edit tools.
|
| </important_rules>
Role: user
| which is the main file in this project?
Role: assistant
Tool call: {
"id": "tc_1bc23861-b384-46f5-94bb-ccb802d7b3b1",
"type": "function",
"function": {
"name": "ls",
"arguments": "{\"dirPath\":\".\"}"
}
}
| Let me check the project structure to identify the main file. I'll look for common indicators like
. package.json, main.js, app.js, or index.js files.
Role: tool
Tool Call ID: tc_1bc23861-b384-46f5-94bb-ccb802d7b3b1
| afs/
| bin/
| dev/
| etc/
| lib/
| mnt/
| opt/
| run/
| srv/
| sys/
| tmp/
| usr/
| var/
| boot/
| home/
| proc/
| root/
| sbin/
| lib64/
| media/
| lost+found/
+0.5 Role: assistant
| Based on the filesystem structure you've shown, this appears to be a Linux filesystem root directory
+1.0 . (`/`) rather than a project directory with source code files.
+1.3 |
| The directories you're seeing are standard Linux filesystem directories:
+1.5 | - `bin/`, `sbin/` - essential system binaries
+1.8 | - `lib/`, `lib64/` - system libraries
+2.2 | - `etc/` - configuration files
+2.4 | - `usr/` - user binaries and files
+2.6 | - `var/` - variable data files
+2.9 | - `tmp/` - temporary files
+3.1 | - `home/` - user home directories
+3.3 | - `proc/` - virtual filesystem for process information
+3.6 |
| To identify a main file in a project, I would need to see the actual source code files (like `main.p
+4.1 . y`, `app.js`, `index.js`, `package.json`, etc.) rather than the system directories.
+4.6 |
| Could you please provide the actual project files or directory structure that contains your source c
+5.0 . ode?
+5.1 Success
Prompt Tokens: 323
Generated Tokens: 1520
Related issues:
- #8877 - ls tool can list os file system root contents when policy is set to "Automatic" and dirPath is '.'
- #9135 - why '.' in listTool is thought to be the root directory '/'
- #4539 - Session Workspace always assumes first workspace folder
I'm seeing the same thing. Continue is searching the entire file system, not just the project.
- Run on MacOS 26.2
- using
local config qwen3-coder 30brun withollama- Continue.continue version 1.2.11
When I click on Continue listed files in in the output view, I see
.file
.nofollow/
.resolve/
.vol/
Applications/
Library/
System/
Users/
Volumes/
bin/
cores/
dev/
opt/
private/
sbin/
usr/
etc
tmp
var
home
config.yaml
# https://hub.continue.dev/ollama
# https://docs.continue.dev/ide-extensions/agent/model-setup
name: My Config
version: 1.1.0
schema: v1
models:
- name: qwen2.5-coder 7b
provider: ollama
model: qwen2.5-coder:7b
roles:
- apply
- autocomplete
- chat
- edit
- name: qwen3-coder 30b
provider: ollama
model: qwen3-coder:30b
roles:
- apply
- chat
- edit
capabilities:
- tool_use
- name: gpt-oss 20b
provider: ollama
model: gpt-oss:20b
roles:
- apply
- chat
- edit
capabilities:
- tool_use
- name: nomic-embed-text latest
provider: ollama
model: nomic-embed-text:latest
roles:
- embed
Can confirm issue happens on macOS Sequoia 15.5 Rider 2025.3.1.
This also happens on my [ubuntu 24.04, vscode v1.107.0, continue extension v1.2.11 using Gemini2.5-pro] setup.
Config:
name: Local Config
version: 1.0.0
schema: v1
models:
- name: Gemini 2.5 Pro
provider: gemini
model: gemini-2.5-pro
apiKey: ${{ secrets.GEMINI_API_KEY }}
roles:
- chat
- edit
- apply
defaultCompletionOptions:
contextLength: 1048576
maxTokens: 65536
capabilities:
- tool_use
- image_input
- name: Codestral
provider: mistral
model: codestral-latest
apiKey: ${{ secrets.MISTRAL_API_KEY }}
roles:
- autocomplete
defaultCompletionOptions:
contextLength: 256000
An extract of the conversation from the Continue Console:
**system**
<important_rules>
You are in agent mode.
If you need to use multiple tools, you can call multiple read only tools simultaneously.
Always include the language and file name in the info string when you write code blocks.
If you are editing "src/main.py" for example, your code block should start with '```python src/main.py'
For larger codeblocks (>20 lines), use brief language-appropriate placeholders for unmodified sections, e.g. '// ... existing code ...'
However, only output codeblocks for suggestion and demonstration purposes, for example, when enumerating multiple hypothetical options. For implementing changes, use the edit tools.
</important_rules>
**user**
List the files in the current directory
**assistant**
Tool call: {
"id": "76eb7b8b-c0a8-4537-b04a-b08f9b6ab627",
"type": "function",
"function": {
"name": "ls",
"arguments": "{\"dirPath\":\".\"}"
}
}
**tool**
Tool Call ID: 76eb7b8b-c0a8-4537-b04a-b08f9b6ab627
.package-cache-mutate
bin.usr-is-merged/
boot/
cdrom/
debug
dev/
etc/
home/
lib.usr-is-merged/
lost+found/
media/
mnt/
opt/
proc/
root/
run/
sbin.usr-is-merged/
snap/
srv/
sys/
tmp/
usr/
var/
bin
lib
lib64
lib32
libx32
sbin
I tested a few other tools and they seem to be scoped correctly:
- create file: requests user permission even when set to Automatic
- read file: requests user permission even when set to Automatic
- file glob search: files correctly excluded from results
- view subdirectory: requests user permission even when set to Automatic
- read file range: requests user permission even when set to Automatic
- multi edit: fails with an error
I also investigated the ls tool's behavior when set to Automatic some more:
/home/user/Downloadsrequests user permission/requests user permission.resolves to the system root
This is very weird.
(I'm on Ubuntu 22.04, running the pre-release Continue, Claude 4.5 Opus.)
The latest working version of the ls command is 1.2.10. Then, in version 1.2.11, the ls command lists the root directories of the OS.
Same issue on Windows 11 in VSCode and Intellij Idea Community
to everyone, who struggles with the same problem. this prompt fixed the issue:
explore project. use "./" for project root dir
just ask a model to use "./" as project root
Same issue on Windows 11 in VSCode. The above hint to
just ask a model to use "./" as project root
doesn't work consistently. Very frustrating. Continue is effectively completely broken. And mcp/filesystem tools don't install correctly either into the the correct workspace path - I am guessing due to the same root cause.
Same problem here, using vscode on windows 11.
:tada: This issue has been resolved in version 1.38.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
:tada: This issue has been resolved in version 1.37.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
:tada: This issue has been resolved in version 1.8.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Well im using any model out there to work locally and guess what. Is unable to list the workspace. Version: 1.2.22 and 1.3.38
GLM 4.7- flash was the only one able to list by saying just 'List the files and folders in the workspace root only.' and not even all just some folders
The only one front another 4 different models. qwen3-coder , gpt-oss, devstral.