#1298·jcode

Grok Build ACP session/resume fails with FS_NOT_FOUND after cwd drift

Author: vietgs03Created Sep 18, 2026Updated Sep 18, 2026

Summary

After a Grok Build ACP process restarts (daemon reload, dropped stream, next turn), Jcode resumes with:

Grok CLI ACP session/resume failed: Path not found.: {
  "code": "FS_NOT_FOUND",
  "detail": "No such file or directory (os error 2)"
}

The previous Grok conversation is still on disk. Resume looks in the wrong workspace folder.

Reproduction

  1. Start a Grok Build session while the Grok CLI workspace is /mnt/c/Users/HASAKI (or any cwd other than the Jcode daemon cwd).
  2. Reload the shared daemon or otherwise drop the ACP subprocess.
  3. Send another message in the same Jcode session.

Expected

session/resume uses the cwd Grok originally stored the session under (~/.grok/sessions/<percent-encoded-cwd>/<session-id>).

Actual

Jcode always passes std::env::current_dir() (often the daemon's $HOME). Grok looks under ~/.grok/sessions/%2Fhome%2Fviethx/<id> instead of the original folder, e.g. ~/.grok/sessions/%2Fmnt%2Fc%2FUsers%2FHASAKI/<id>.

Notes

If the session folder is genuinely gone, resume should fall back to session/new instead of failing the turn.