Allow Grok plan.md writes when home is the workspace#11
Merged
Conversation
9a67cfb to
368246c
Compare
Owner
|
Thanks for this! |
phuryn
added a commit
that referenced
this pull request
May 30, 2026
PR #11 landed the fix on top of the already-tagged v1.2.2, so the home-as-workspace plan.md exemption sat on main as unreleased work with no version of its own and no changelog trail. Per the repo's contributor-credit convention, give it a 1.2.3 section thanking @shugav, bump package.json to match, and refresh the CLAUDE.md test-count floor (221 -> 223) for the two regression tests the PR added. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #10.
Summary
Plan mode should allow and snoop Grok's own
.grok/sessions/.../plan.mdwrites, but v1.2.2 can still block them when the VS Code workspace root is the user's home directory. In that layout, the plan file is both:This updates the write gate so plan-file writes are exempted before workspace containment is applied, but only when the path is under the resolved Grok home (
~/.grok). That keeps normal workspace writes blocked and avoids treating an arbitrary project-local.grok/sessions/.../plan.mdas Grok's own session file.Verification
.grok/sessions/.../plan.mdremains blocked when it is not under the resolved Grok home.npm test -- --run test/plan-gate.test.ts test/acp-integration.test.ts(49 tests)npm run compilegit diff --checknpm test(223 tests)npm run packageLocal confirmation
After installing the patched VSIX locally, the exact observed path now evaluates correctly:
Notes
This preserves the existing Plan mode design: normal workspace writes remain blocked while planning, but Grok's CLI-owned plan file remains allowed and snooped even when the user opens their home directory as the workspace.