# Jiva v0.3.45 — Windows Compatibility Fixes for Code Mode

**Release Date:** May 8, 2026

---

## Bug Fixes

### Code mode wrote files to `/workspace/` instead of the actual workspace directory on Windows

**Symptom:** On Windows, Jiva code mode correctly displayed the workspace directory (e.g. `C:\Users\<user>\myproject`) at startup, but then wrote and edited files under `C:\workspace\...` instead.

**Root cause:** The `read_file` tool description contained hardcoded example paths:
```
Example: {"path": "/workspace/src/index.ts"}
```
The LLM pattern-matched against these examples when generating tool calls, producing `/workspace/...` paths rather than paths relative to the actual workspace. On Windows, Node.js treats `/workspace/src/index.ts` as an absolute path (root of the current drive), so `path.isAbsolute()` returned `true` and `workspaceDir` was bypassed entirely.

**Fix:** The example paths in the `read_file` tool description are now relative (`src/index.ts`), which the tool resolves correctly against the workspace directory on all platforms. (`src/code/tools/read.ts`)

---

### Shell commands failed on Windows due to `cmd.exe` being used instead of PowerShell

**Symptom:** The `bash` tool executed commands via `cmd.exe` on Windows. Commands using common shell syntax (`&&` chaining, `$VAR` substitution, pipes) failed or produced unexpected results.

**Fix:** On Windows, the `bash` tool now explicitly uses `powershell.exe` as the shell, which supports the developer workflows (npm, git, build tools) that code mode relies on. (`src/code/tools/bash.ts`)

---

### `grep` results showed Windows-style backslash paths, causing path inconsistency

**Symptom:** On Windows, `grep` returned match locations like `src\file.ts:5: content` (backslashes), while other tools returned forward-slash paths. This inconsistency could cause the LLM to mix path separator styles across tool calls.

**Fix:** `grep` output now normalises relative paths to forward slashes on all platforms. (`src/code/tools/grep.ts`)

---

## Upgrade

```bash
# This bug fix version was only released as a dev release and will be bundled into v0.3.46
npm install -g jiva-core@0.3.45-dev.53be99d
```
