Eval kernel cwd is not the session project directory: relative paths in eval cells fail with ENOENT in the desktop engine

#9371 · open · 1 comments

View on GitHub ↗

code-yeongyu

## Summary In the desktop app's bundled engine (omo 5.1.7 / senpi 2026.9.30, desktop nightly 0.0.34-nightly.20261001.679), the JS eval kernel's working directory is not the session's project directory. A relative path in an eval cell fails even though the thread is opened on the project. ## Reproduction 1. Desktop app, fresh profile, add a project that contains `src/todo.ts`, start a thread in it. 2. Ask: "run exactly one js eval cell that only counts the lines of src/todo.ts". 3. The model's first cell does `Bun.file("src/todo.ts")` (relative) -> **ENOENT: no such file or directory, open 'src/todo.ts'**. The tool row shows "Ran code ... Failed". 4. The model then retries with the absolute path, which works. It explains: "The eval kernel resolves paths from its own cwd, not the project dir". ## Expected Eval cells run with `process.cwd()` equal to the session's project directory (the same cwd the read/edit/bash tools use), so relative paths behave the same in every tool. ## Actual Relative paths in eval resolve against a different directory. That costs a failed tool call and an extra turn, and a less careful model may report the file as missing. Found during the desktop new-user QA pass (2026-10-01).

Comments

code-yeongyu

Screenshots from the QA run (isolated profile, names and paths sanitized): <img width="900" alt="screenshot" src="https://github.com/user-attachments/assets/72c87274-ec9d-484a-8a0c-8290fffd7208" />