grep_search: spurious "escapes workspace boundary" on first run in a directory with no .claw/ (Windows)
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 68/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- rust
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Rust
- スター
- 195k
- フォーク
- 108k
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ultraworkers/claw-code のほかの issue
-
Fix markdown formatting issues in TUI streaming: block-level element newline omission and consecutive empty line accumulation再び着手できるかも @Aditaya08 が 51 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
ultraworkers/claw-code#3259 · コメント 7 件 ·
-
fix(cli): resolve duplicate assistant text printing after 'Done' in non-compact text mode対応中かも @nankingjing が 90 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ultraworkers/claw-code#3258 · コメント 1 件 ·
-
bug: Missing newlines before paragraphs and code blocks in streamed Markdown rendering対応中かも @nankingjing が 90 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
ultraworkers/claw-code#3257 · コメント 2 件 ·
-
[CRITICAL][SECURITY] Untrusted project hooks bypass read-only mode for arbitrary command executionオープン
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
ultraworkers/claw-code#3301 · コメント 4 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 20/100
ultraworkers/claw-code#3300 · コメント 2 件 ·
ultraworkers/claw-code の issue をすべて見る
似ている issue
-
area:docs documentation good first issue priority:low
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
triage:accepted
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
open-telemetry/otel-arrow#4343 ·
メンテナーはふだん 2 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
mishraprafful/multihull#150 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
voidzero-dev/vite-plus#2970 ·
メンテナーはふだん 1 日以内に返信
-
ai_p2 comp-parquet-reader-v3
難易度 2/5 半日 初心者へのやさしさ 66/100
ClickHouse/ClickHouse#124986 ·
メンテナーはふだん 1 日以内に返信