Skip to content

feat(context-save): persist plan file before saving checkpoint when in plan mode#2106

Open
ruth-zhangx wants to merge 1 commit into
garrytan:mainfrom
ruth-zhangx:feat/context-save-plan-persistence
Open

feat(context-save): persist plan file before saving checkpoint when in plan mode#2106
ruth-zhangx wants to merge 1 commit into
garrytan:mainfrom
ruth-zhangx:feat/context-save-plan-persistence

Conversation

@ruth-zhangx

Copy link
Copy Markdown

When GSTACK_PLAN_MODE=active and CLAUDE_PLAN_FILE exists, /context-save now
persists the plan to .claude/plans/ before writing the checkpoint. This
prevents plan loss when the user saves and exits without approving the plan
(via ExitPlanMode) — common on unstable hardware or when the user needs to
rest.

The plan is saved with a timestamp and also copied to active-plan.md as a
stable symlink target for /context-restore.

Fixes: checkpoint referencing a plan path that does not exist on disk.

…n plan mode

When GSTACK_PLAN_MODE=active and CLAUDE_PLAN_FILE exists, /context-save now
persists the plan to .claude/plans/ before writing the checkpoint. This
prevents plan loss when the user saves and exits without approving the plan
(via ExitPlanMode) — common on unstable hardware or when the user needs to
rest.

The plan is saved with a timestamp and also copied to active-plan.md as a
stable symlink target for /context-restore.

Fixes: checkpoint referencing a plan path that does not exist on disk.
@trunk-io

trunk-io Bot commented Jun 24, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant