grep_search: spurious "escapes workspace boundary" on first run in a directory with no .claw/ (Windows)
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 68/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- rust
- Ambito
- operating-systems, tooling
Direzione di ricerca
Start by reproducing the Windows fresh-directory case using the grep_search entry point, then trace its workspace-boundary check alongside first-run .claw/ initialization. Done means the first search succeeds in a directory without .claw/ and path containment works consistently for plain and extended-length Windows paths.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
On Windows, the first grep_search in a working directory that does not yet contain a .claw/ directory fails with a workspace-boundary error. The reported "escaping" path and the boundary path are the same path, differing only by the \?\ extended-length prefix — which suggests the boundary check compares a plain path against a canonicalized/extended path without normalizing the prefix first.
Once .claw/ exists in that directory, subsequent grep_search calls succeed. So this reads as an initialization-order race rather than a permanent failure.
Error
✗ grep_search
ExecutionError { message: "path C:\tmp\clawpath\normaldir escapes workspace boundary \\?\C:\tmp\clawpath\normaldir", source: None }
Note both sides are C:\tmp\clawpath\normaldir; only the prefix differs.
Reproduction
$env:OPENAI_BASE_URL="http://localhost:1234/v1" # any OpenAI-compatible local server
$env:OPENAI_API_KEY="local-dev-token"
mkdir C:\tmp\clawpath\brandnew
"hello TARGETSTRING here" | Set-Content C:\tmp\clawpath\brandnew\sample.txt
cd C:\tmp\clawpath\brandnew
claw --model "<your-local-model>" prompt "Use grep_search to find TARGETSTRING in this directory."
Observed
| Directory | .claw/ present beforehand |
grep_search |
|---|---|---|
| fresh dir, 1st run | no | fails — escapes workspace boundary |
| same dir, 2nd/3rd run | yes | succeeds |
Reproduced on 2 of 3 fresh directories; 0 of 3 already-initialized directories. The one fresh directory that succeeded had .claw/sessions/*.jsonl already flushed by the time grep ran, which is consistent with a race between workspace initialization and the tool's boundary check.
Expected
grep_search should resolve/normalize both paths (strip or apply the \?\ prefix consistently) before the containment comparison, and should not depend on .claw/ already existing.
Impact
read_file works in the same directory where grep_search fails, so the failure is partial and easy to misread as a model/tool-calling problem rather than a harness bug — it cost us some misdiagnosis while evaluating local models.
Environment
- Claw Code
v0.1.3(git4ea31c1bc91c), built from source - Windows 10 Pro 19045,
rustc/cargo1.97.1, MSVC (VS Build Tools 2019) - Provider: local OpenAI-compatible server (LM Studio,
:1234)
Workaround
Run any command that initializes .claw/ in the directory first, then grep_search works.
- Lingua principale
- Rust
- Stelle
- 195k
- Fork
- 108k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ultraworkers/claw-code
-
Fix markdown formatting issues in TUI streaming: block-level element newline omission and consecutive empty line accumulationForse di nuovo libera @Aditaya08 l’ha presa 51 giorni fa e non c’è nessuna pull request aperta. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
ultraworkers/claw-code#3259 · 7 commenti ·
-
fix(cli): resolve duplicate assistant text printing after 'Done' in non-compact text modeForse già presa @nankingjing l’ha presa 90 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ultraworkers/claw-code#3258 · 1 commento ·
-
bug: Missing newlines before paragraphs and code blocks in streamed Markdown renderingForse già presa @nankingjing l’ha presa 90 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
ultraworkers/claw-code#3257 · 2 commenti ·
-
[CRITICAL][SECURITY] Untrusted project hooks bypass read-only mode for arbitrary command executionAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 68/100
ultraworkers/claw-code#3301 · 4 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 20/100
ultraworkers/claw-code#3300 · 2 commenti ·
Tutte le issue di ultraworkers/claw-code
Issue simili
-
✨ enhancement needs-discussion
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
-
docs(openclaw): RTK_REWRITE_HOST relaxes every default ask, not only commands no rule matchedApertaarea:docs documentation good first issue priority:low
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
rtk-ai/rtk#4500 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
triage:accepted
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
open-telemetry/otel-arrow#4343 ·
I maintainer di solito rispondono entro 2 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
mishraprafful/multihull#150 ·
I maintainer di solito rispondono entro 1 giorno
-
area:tooling bug good first issue priority:P3
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
michaelnavazhylau/ngspice-rs#129 ·
I maintainer di solito rispondono entro 1 giorno