Skip to content

[Fix] Architect mode fails to save plans with EROFS when creating /plans at filesystem root#968

Open
zoomote[bot] wants to merge 1 commit into
mainfrom
fix/architect-plans-relative-path-3qskmqrd412q9
Open

[Fix] Architect mode fails to save plans with EROFS when creating /plans at filesystem root#968
zoomote[bot] wants to merge 1 commit into
mainfrom
fix/architect-plans-relative-path-3qskmqrd412q9

Conversation

@zoomote

@zoomote zoomote Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Opened on behalf of Toray Altas. View the task or mention @zoomote for follow-up asks.

Related GitHub Issue

Closes: #965

Description

In Architect mode, Zoo attempted to create a plans directory at the absolute filesystem root (/plans) and failed with EROFS: read-only file system, mkdir '/plans'.

Root cause: the Architect mode customInstructions in packages/types/src/mode.ts ended with "if you want to save a plan file, put it in the /plans directory". The leading slash leads models to interpret /plans as an absolute path instead of a workspace-relative one, so write_to_file / execute_command (mkdir /plans) targeted the real filesystem root.

The instruction now reads "put it in the ./plans directory (a directory named "plans" relative to the workspace root, not the absolute filesystem path /plans)". A repo-wide search confirmed this prompt text was the only place an absolute /plans path was instructed. The 10 affected system-prompt snapshot files were regenerated/updated to match.

Test Procedure

  • pnpm test (full turbo run, forced uncached): all 10 tasks successful — 414 test files / 6786 tests passed in the main package, including the system-prompt snapshot tests that assert the Architect mode instructions.
  • Pre-commit hooks ran lint and check-types across all packages: all green.
  • Reviewers can verify by inspecting the Architect mode system prompt (e.g., via the snapshot src/core/prompts/__tests__/__snapshots__/add-custom-instructions/architect-mode-prompt.snap) and confirming it references ./plans relative to the workspace root.

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: New and/or updated tests have been added to cover my changes (if applicable).
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Screenshots / Videos

N/A — prompt-text change only; no UI surface is affected.

Documentation Updates

  • No documentation updates are required. The docs site does not document the /plans behavior; this restores the intended workspace-relative behavior.

Additional Notes

Optional future hardening (out of scope here): normalizing or rejecting workspace-escaping absolute paths in write_to_file so an absolute /plans path resolves inside the workspace or is rejected with a clear error.

Linked work items

Closes #965

The Architect mode custom instructions ended with 'put it in the /plans
directory', which models interpreted as an absolute filesystem path,
causing 'EROFS: read-only file system, mkdir /plans' when saving plan
files. Reword to './plans' and clarify it is relative to the workspace
root.

Fixes #965
@zoomote zoomote Bot assigned taltas Jul 20, 2026
@zoomote

zoomote Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

No code issues found. See task

Verified in context: the /plans./plans prompt rewording in packages/types/src/mode.ts:185 is the only place the absolute path was instructed (repo-wide search), all 10 system-prompt snapshots were regenerated consistently with no stale copies remaining, the existing .gitignore entry plans/ matches the workspace-relative directory, and the file passes the repo's Prettier config. The write_to_file path-hardening idea is already noted in the PR description as explicit future scope.

Reviewed f2f5e62

@codecov

codecov Bot commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@taltas
taltas marked this pull request as ready for review July 21, 2026 21:22
@github-actions github-actions Bot added the awaiting-review PR changes are ready and waiting for maintainer re-review label Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-review PR changes are ready and waiting for maintainer re-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Zoo is attempting to be refactored, but a permission issue occurs when accessing the mkdir /plans directory.

1 participant