Skip to content

Commit 268634c

Browse files
committed
Document Windows shell quirks for AI agents in CLAUDE.md (#210)
1 parent e88676b commit 268634c

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

CLAUDE.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,33 @@ When modifying Python bindings:
6060
4. Test command: `pytest source/bind/python/tests`
6161
5. Ensure `numpy` is installed in the active Python environment
6262

63+
### Windows: AI Agent Shell Sessions
64+
65+
AI coding agents typically run each shell command as an independent,
66+
non-interactive process. On Windows this creates friction that a human
67+
running one persistent terminal never sees:
68+
69+
- **PATH/environment activation does not persist between commands.**
70+
`conda activate <env>` (see `environment.yml` for the env name) only
71+
affects the process it runs in. Since cmake, gfortran, and ctest are
72+
commonly installed only inside that conda environment on Windows, each
73+
individual command that needs them must activate the environment or
74+
prepend its `Library/bin`, base, and `Scripts` directories to `PATH`
75+
within that same command — don't assume a prior "activate" call carries
76+
forward to the next one.
77+
- **Avoid `python3` in Git Bash.** Windows intercepts unqualified
78+
`python3` calls with an app-execution alias that prompts to install
79+
Python from the Microsoft Store instead of running the real
80+
interpreter. Use `python` instead.
81+
- **Avoid heredoc-to-stdin patterns in Git Bash** (e.g. `cmd <<'EOF'
82+
... EOF` piped via `/dev/stdin`, or `cmd | python -c "..."` relying on
83+
piped stdin through `/proc/self/fd/0`). Git Bash's stdin/fd emulation
84+
is unreliable for this on Windows; write the input to a temp file and
85+
reference that instead.
86+
- If a build tool isn't found on PATH, check the project's conda
87+
environment directory directly rather than running a broad filesystem
88+
search — those are slow and prone to timing out.
89+
6390
## Testing
6491

6592
- **Run existing tests** before and after changes

0 commit comments

Comments
 (0)