From a13dc4f6cd4dec7a091472cf7ff9ae4c5ea15e43 Mon Sep 17 00:00:00 2001 From: Saim Shafique Date: Fri, 20 Nov 2026 05:06:46 +0000 Subject: [PATCH 1/2] fix(pstack): connect session pickup to the pause resume note Pause safely wrote the resume note to /tmp, which does not survive the restart the overnight guide lists as a pause trigger, and Session pickup never looked for the note at all, so a fresh chat rebuilt the note content from the transcript. Pause safely now writes the note next to the show-me-your-work trail (.audit/-resume.md) and names its path in the pause reply. Session pickup reads the named note first, falling back to the transcript, cloud-agent URL, or pushed branch when there is no note. The /tmp path stays only for the compaction trigger, where no restart is involved. Fixes #1296 --- pstack/skills/poteto-mode/playbooks/pause-safely.md | 4 ++-- pstack/skills/poteto-mode/playbooks/session-pickup.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pstack/skills/poteto-mode/playbooks/pause-safely.md b/pstack/skills/poteto-mode/playbooks/pause-safely.md index 9d1c5f8303..bcf3ccc63d 100644 --- a/pstack/skills/poteto-mode/playbooks/pause-safely.md +++ b/pstack/skills/poteto-mode/playbooks/pause-safely.md @@ -5,6 +5,6 @@ 1. Stop at a safe boundary. Finish the current atomic step or back out of it. Start nothing new, and cancel any nested subagents. 2. Take no irreversible action to pause. No PR and no push unless you already had one out. 3. Make the work durable. Commit uncommitted edits as one clear `wip:` commit on the current branch so nothing is lost. If the tree is broken, say so in the commit body in one line. -4. Write the resume note off-context. Capture intent, what you were doing, progress and what's verified, current state, next steps, key files, and gotchas. For the compaction trigger write it to a file like `/tmp/-resume.md`. If a show-me-your-work trail exists, point at it instead of duplicating it. +4. Write the resume note off-context. Capture intent, what you were doing, progress and what's verified, current state, next steps, key files, and gotchas. Write it where it survives a restart: `.audit/-resume.md`, next to the show-me-your-work trail when one exists. Only for the compaction trigger, where no restart is involved, is a file like `/tmp/-resume.md` fine. If a show-me-your-work trail exists, point at it instead of duplicating it. Name the note's path in your reply so Session pickup can find it. -**Reply:** where you are in the loop, what's on disk versus still in your head (paths, no diff dumps), the commits you made and whether the tree is clean, and the first action on resume. This is a pause, not a final report. +**Reply:** where you are in the loop, what's on disk versus still in your head (paths, no diff dumps), the commits you made and whether the tree is clean, the path of the resume note, and the first action on resume. This is a pause, not a final report. diff --git a/pstack/skills/poteto-mode/playbooks/session-pickup.md b/pstack/skills/poteto-mode/playbooks/session-pickup.md index fcde2b2262..382ac4a53a 100644 --- a/pstack/skills/poteto-mode/playbooks/session-pickup.md +++ b/pstack/skills/poteto-mode/playbooks/session-pickup.md @@ -2,7 +2,7 @@ **You own the resume point. Read the prior trail, don't redo it.** -1. Locate the prior trail. A local transcript under the active workspace's `agent-transcripts/` directory (the system prompt names the path. Do not glob across `~/.cursor/projects/*/`, that crosses workspace boundaries and reads private chats from unrelated projects), a cloud-agent URL, or a pushed branch. Read the metadata overview and last messages first, then scan back for the decision points. Parse a long transcript in a subagent and keep the reduced timeline in the main thread (the **principle-guard-the-context-window** skill). Pick each subagent's reasoning level for the job, per the Subagents section. +1. Locate the prior trail. If the pause reply named a resume note, read it first: it carries intent, what's verified, next steps, and gotchas. It lives next to the show-me-your-work trail (`.audit/-resume.md`) or, for the compaction trigger, at `/tmp/-resume.md`. Otherwise, find the trail from a local transcript under the active workspace's `agent-transcripts/` directory (the system prompt names the path. Do not glob across `~/.cursor/projects/*/`, that crosses workspace boundaries and reads private chats from unrelated projects), a cloud-agent URL, or a pushed branch. Read the metadata overview and last messages first, then scan back for the decision points. Parse a long transcript in a subagent and keep the reduced timeline in the main thread (the **principle-guard-the-context-window** skill). Pick each subagent's reasoning level for the job, per the Subagents section. 2. Reconstruct operational state. The branch and worktree, what already landed (`git log`, `git diff` against the base), the open todos, the decisions made. The prior trail is authoritative input. Resist the bias to re-derive it. 3. Diff done vs pending. Compare what shipped against what was planned, name the resume point, do not re-run the prior repro or redo completed work. A "let me verify from scratch" pass means you're treating the trail as untrustworthy when it's authoritative. 4. Route the remaining work to the matching playbook and pick the verdict: continue the execution, ship a finished recommendation, ratify or override a prior conclusion, or postmortem a failed run. The pickup playbook ends here. The routed playbook owns the rest. From 8056fb12e88ed4a1921927ff545c2ab75c57e414 Mon Sep 17 00:00:00 2001 From: Saim Shafique Date: Fri, 20 Nov 2026 16:21:38 +0000 Subject: [PATCH 2/2] chore(pstack): regenerate harness trees for the resume-note fix The Validate plugins workflow checks that the generated harness trees match the pstack sources. Regenerate them after connecting session pickup to the pause resume note. --- .../claude-code/skills/poteto-mode/playbooks/pause-safely.md | 4 ++-- .../skills/poteto-mode/playbooks/session-pickup.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/harness/pstack/claude-code/skills/poteto-mode/playbooks/pause-safely.md b/harness/pstack/claude-code/skills/poteto-mode/playbooks/pause-safely.md index 9d1c5f8303..bcf3ccc63d 100644 --- a/harness/pstack/claude-code/skills/poteto-mode/playbooks/pause-safely.md +++ b/harness/pstack/claude-code/skills/poteto-mode/playbooks/pause-safely.md @@ -5,6 +5,6 @@ 1. Stop at a safe boundary. Finish the current atomic step or back out of it. Start nothing new, and cancel any nested subagents. 2. Take no irreversible action to pause. No PR and no push unless you already had one out. 3. Make the work durable. Commit uncommitted edits as one clear `wip:` commit on the current branch so nothing is lost. If the tree is broken, say so in the commit body in one line. -4. Write the resume note off-context. Capture intent, what you were doing, progress and what's verified, current state, next steps, key files, and gotchas. For the compaction trigger write it to a file like `/tmp/-resume.md`. If a show-me-your-work trail exists, point at it instead of duplicating it. +4. Write the resume note off-context. Capture intent, what you were doing, progress and what's verified, current state, next steps, key files, and gotchas. Write it where it survives a restart: `.audit/-resume.md`, next to the show-me-your-work trail when one exists. Only for the compaction trigger, where no restart is involved, is a file like `/tmp/-resume.md` fine. If a show-me-your-work trail exists, point at it instead of duplicating it. Name the note's path in your reply so Session pickup can find it. -**Reply:** where you are in the loop, what's on disk versus still in your head (paths, no diff dumps), the commits you made and whether the tree is clean, and the first action on resume. This is a pause, not a final report. +**Reply:** where you are in the loop, what's on disk versus still in your head (paths, no diff dumps), the commits you made and whether the tree is clean, the path of the resume note, and the first action on resume. This is a pause, not a final report. diff --git a/harness/pstack/claude-code/skills/poteto-mode/playbooks/session-pickup.md b/harness/pstack/claude-code/skills/poteto-mode/playbooks/session-pickup.md index fcde2b2262..382ac4a53a 100644 --- a/harness/pstack/claude-code/skills/poteto-mode/playbooks/session-pickup.md +++ b/harness/pstack/claude-code/skills/poteto-mode/playbooks/session-pickup.md @@ -2,7 +2,7 @@ **You own the resume point. Read the prior trail, don't redo it.** -1. Locate the prior trail. A local transcript under the active workspace's `agent-transcripts/` directory (the system prompt names the path. Do not glob across `~/.cursor/projects/*/`, that crosses workspace boundaries and reads private chats from unrelated projects), a cloud-agent URL, or a pushed branch. Read the metadata overview and last messages first, then scan back for the decision points. Parse a long transcript in a subagent and keep the reduced timeline in the main thread (the **principle-guard-the-context-window** skill). Pick each subagent's reasoning level for the job, per the Subagents section. +1. Locate the prior trail. If the pause reply named a resume note, read it first: it carries intent, what's verified, next steps, and gotchas. It lives next to the show-me-your-work trail (`.audit/-resume.md`) or, for the compaction trigger, at `/tmp/-resume.md`. Otherwise, find the trail from a local transcript under the active workspace's `agent-transcripts/` directory (the system prompt names the path. Do not glob across `~/.cursor/projects/*/`, that crosses workspace boundaries and reads private chats from unrelated projects), a cloud-agent URL, or a pushed branch. Read the metadata overview and last messages first, then scan back for the decision points. Parse a long transcript in a subagent and keep the reduced timeline in the main thread (the **principle-guard-the-context-window** skill). Pick each subagent's reasoning level for the job, per the Subagents section. 2. Reconstruct operational state. The branch and worktree, what already landed (`git log`, `git diff` against the base), the open todos, the decisions made. The prior trail is authoritative input. Resist the bias to re-derive it. 3. Diff done vs pending. Compare what shipped against what was planned, name the resume point, do not re-run the prior repro or redo completed work. A "let me verify from scratch" pass means you're treating the trail as untrustworthy when it's authoritative. 4. Route the remaining work to the matching playbook and pick the verdict: continue the execution, ship a finished recommendation, ratify or override a prior conclusion, or postmortem a failed run. The pickup playbook ends here. The routed playbook owns the rest.