Documentation
¶
Overview ¶
grok-session-cwd-rebind: experiment whether Grok session tool cwd can be rebound after the original workspace directory is deleted, by editing session meta files under a custom GROK_HOME.
Modes:
(default) repro — delete old workspace, resume with --cwd NEW, no meta
patch. Expect sticky/broken cwd (exit non-zero + REPRO:).
--expect=healthy — apply --patch set, then expect pwd tool cwd == NEW
(exit 0 + VERIFY:).
Usage:
go run ./script/debug/grok-session-cwd-rebind go run ./script/debug/grok-session-cwd-rebind --expect=healthy --patch=move_dir go run ./script/debug/grok-session-cwd-rebind --keep-root /tmp/my-exp
Minimal working patch (2026-07-13 experiment): **move_dir alone** rebinds tool cwd. Editing summary.json / prompt_context.json without moving the session directory under sessions/<url-encoded-cwd>/ is NOT enough.
Prerequisites: `grok` on PATH; ~/.grok/auth.json (copied into custom GROK_HOME).
Click to show internal directories.
Click to hide internal directories.