claw-code/rust/crates/rusty-claude-cli
YeonGyu-Kim 5f6f453b8d fix(cli): warn when launched from home dir or filesystem root
Users launching claw from their home directory (or /) have no project
boundary — the agent can read/search the entire machine, often far beyond
the intended scope. kapcomunica in #claw-code reported exactly this:
'it searched my entire computer.'

Add warn_if_broad_cwd() called at prompt and REPL startup:
- checks if CWD == $HOME or CWD has no parent (fs root)
- prints a clear warning to stderr:
    Warning: claw is running from a very broad directory (/home/user).
    The agent can read and search everything under this path.
    Consider running from inside your project: cd /path/to/project && claw

Warning fires on both claw (REPL) and claw prompt '...' paths.
Does not fire from project subdirectories. Uses std::env::var_os("HOME"),
no extra deps.

159 CLI tests pass, fmt clean.
2026-04-09 21:26:51 +09:00
..
.claw/sessions feat(runtime): typed task packet format for structured claw dispatch 2026-04-04 00:40:20 +09:00
src fix(cli): warn when launched from home dir or filesystem root 2026-04-09 21:26:51 +09:00
tests fix(cli): 6 cascading test regressions hidden behind client_integration gate 2026-04-08 14:54:10 +09:00
Cargo.toml Close the clawability backlog with deterministic CLI output and lane lineage 2026-04-05 18:41:02 +00:00
build.rs feat(cli): populate Git SHA, target triple, and build date at compile time via build.rs 2026-04-08 18:11:46 +09:00