Skip to content

stash plan reports "Plan drafted at .cipherstash/plan.md" and exits 0 without writing the file (rc.3 M2) #738

Description

@coderdan

Summary

stash plan prints Plan drafted at .cipherstash/plan.md and exits 0 without the file existing. The success message is unconditional on the write actually happening.

Source

rc.3 skilltester run (2026-07-19/20), finding M2 (major). Observed alongside the nested-agent spawn already tracked as #665 item 3.

Why this is separate from #665

#665 item 3 covers stash plan --target claude-code spawning a nested claude subprocess (which hangs inside an agent session) and crashing on the prisma-next context. That is a different defect: it's a hang/crash, and it's loud.

This one is the opposite failure mode — the command completes, claims success, and exits 0, leaving a downstream agent to read a file that was never created. Nothing in #665's list covers a false success on the write path.

It is, however, the same class of defect as #714 (non-interactive stash init reports false success), which was fixed for init. The same honesty pass hasn't been applied to plan.

Impact

An agent following the documented handoff reads .cipherstash/plan.md, finds nothing, and proceeds without a plan — with no signal that anything went wrong. Combined with #736 (skills not installed for Codex), a Codex run gets neither skills nor a plan while both commands report success.

Proposed fix

Report the outcome that actually occurred:

  • Only print Plan drafted at <path> after a confirmed successful write.
  • If the write fails or is skipped, say so and exit non-zero — or emit the plan to stdout so the content is at least recoverable.

Worth applying the #687 / #714 treatment (honest non-interactive outcomes) to plan as a whole rather than patching the single message, since init and plan share the handoff contract.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions