# Pickup

> Pick up earlier work in a new session, or take over the remaining jobs of a stuck or stopped agent, with its saved state checked against what is live. Use when

- Skill: `ilexpwh/pickup` (Agent Skill)
- Install (CLI): `npx get-skill add ilexpwh/pickup`
- Raw SKILL.md: https://api.skillmd.com/api/skills/ilexpwh/pickup/raw
- Safety review: pending
- Works with: any agent that reads SKILL.md (Claude Code, Claude.ai, Cursor, Codex, Windsurf, 60+ more)
- Category: Coding & Dev Tools
- Author: Ilexpwh (https://skillmd.com/u/ilexpwh)
- Updated: 2026-12-02
- Page: https://skillmd.com/skills/ilexpwh/pickup

---

---
name: pickup
description: Pick up earlier work in a new session, or take over the remaining jobs of a stuck or stopped agent, with its saved state checked against what is live. Use when the user says pick up, pickup, resume, continue where we left off, carry on from yesterday, where were we, what was I doing, after a compaction or /resume, pastes back an earlier Waiting on you list, or says stop that agent and take over its jobs here. Not for saving state before a break (handoff) or a nudge on a run this session is already driving (istack-mode).
disable-model-invocation: true
argument-hint: "[task, worker name, or pasted Waiting on you list]"
metadata:
  phase: ledger
---

# Pickup

Resume a task from its ledger, or take over a stuck agent's work, with the ledger corrected to match the live state and the next step running.

## When to use
- A new session on old work: after compaction, `/resume`, a cleared chat, a night or a week away.
- The user pastes back an earlier "Waiting on you" list, or reports what they did ("merged 1060").
- A worker is stuck, stopped or out of budget and the user wants its remaining jobs done here.

**Not for:** saving state before a break (`../handoff/SKILL.md`), or a nudge on a run this session is already driving (`../istack-mode/playbooks/steer.md`).

## Steps
1. **Load the profile.** Read `$ISTACK_PROFILE` or `~/.istack/profile.md` if it exists: accounts, network quirks, reply language. *Done when:* you can state the facts that affect git and `gh` here, or that there is no profile.
2. **Find and bind the task.** Use `../ledger/scripts/ledger.py` (in Claude Code `${CLAUDE_SKILL_DIR}/../ledger/scripts/ledger.py`) with `python3 -I`; syntax is in `../ledger/references/commands.md`. Run `list` in the project and at the workspace root. Pick the task the user means by name, branch or outcome; ask one question only if two fit. Bind this session: `--host claude --session ${CLAUDE_SESSION_ID} bind --task T`, or `--host codex --session "$CODEX_THREAD_ID"`. Never take a task because it is the newest or because another chat is bound to it. *Done when:* one task is bound, or no ledger exists.
3. **Reconstruct if there is no ledger.** Gather `git log`, branches, `git worktree list`, open PRs, issues and the user's description. Write a goal file whose Objective starts with "Reconstructed from <sources> on <date>", `init` it, bind it, and checkpoint what you found. *Done when:* a task exists and says it is reconstructed.
4. **Read the saved state.** Run `resume` and `doctor`. Read `GOAL.md`, `HANDOFF.md`, and in run mode `run/SUMMARY.md`. Note the status, goal and checkpoint revisions, checkpoint age, blocked items and next actions. On an integrity failure, stop writing and follow "Explicit repair" in `commands.md`. If the task is paused or blocked and the user asked to continue, run `goal-status --task T --status active --reason '<their words>'`. *Done when:* you can state the goal, the last checkpoint and the first open action in one line each.
5. **Reconcile with the live state.** For every tracker item and repo in the goal, check what is true now: `git status`, `git worktree list`, `git log --oneline -5 <branch>`, `gh pr view <n> --json state,mergedAt,statusCheckRollup`, the latest CI run, and the deployed version (version endpoint, release tag or image digest). Fold in anything the user pasted back as evidence. Build a table: item | ledger says | live says | fix. Live wins (`ledger-is-truth`); fix the ledger with `track`, `unblock` and `decide`. Don't redo work the live state shows done. *Done when:* every row agrees after your fixes.
6. **Take over a stuck worker.** Skip unless this is a takeover. Find the worker's name in the tracker owners or the status board. If it is still running, stop it with the host's own control and note the time. Read its last handback (`STATUS / CHANGED / EVIDENCE / NOT DONE / NEXT`, see `../istack-mode/worker.md`) or the tail of its transcript. In its worktree, keep uncommitted edits as a `wip:` commit on its branch or a patch file. Move each unfinished item to yourself: `track --id W2 --owner <you> --note 'taken over from W2-api: <reason>'`. *Done when:* no open item belongs to a stopped worker and none of its edits were lost.
7. **Checkpoint the reconciled state.** Write and save the six sections as in `../handoff/SKILL.md` steps 4–5. *Done when:* `HANDOFF.md` shows the new revision.
8. **Continue the original playbook.** Read the playbook named in the goal, or route through `../istack-mode/SKILL.md`. Copy its remaining steps into the todo list and start the first open one. Keep the goal's tier. *Done when:* the first open step is running.

## Red flags
| If you're thinking | Do this instead |
|---|---|
| "I remember this task; skip the ledger." | Run `resume`, then check live state (`ledger-is-truth`). |
| "I'll redo it from scratch to be safe." | Keep what live state confirms. Re-check only claims whose inputs changed. |
| "The ledger says merged, so it's merged." | Check the PR and the deployed version; fix the ledger if it's wrong. |
| "The newest task must be mine." | Select by name or binding. Ask once if two fit. |
| "The worker looks idle; I'll start a second one on the same item." | Stop it first. One owner per item (`parallel-and-visible`). |
| "Its worktree is a mess; I'll reset it." | Save its edits as a commit or patch. Never `reset --hard` or `clean -f` (`clean-shared-hosts`). |
| "No ledger, so nothing happened." | Read git, PRs and issues, reconstruct, and say it is reconstructed. |

## Verify
- [ ] This session is bound to exactly one task, named in the reply.
- [ ] `doctor` reports no integrity problem.
- [ ] Every reconciliation row agrees after fixes, and each fix is in the ledger.
- [ ] Takeover only: the old worker is stopped, its edits are saved, its items are reassigned with a note.
- [ ] A reconstructed ledger says so in its goal and in the reply.
- [ ] The next step of the original playbook is running.

## Reply
```
Picked up <task> (<bound | reconstructed from <sources>>), checkpoint r<N> from <age> ago.
Reconciled <count> items. Changed: <item>: ledger said <x>, live says <y>; one per line, or "none".
Taken over: <worker> stopped at <time>; <items> now mine.   [takeover only]
Resuming: <playbook> step <n>: <first action>.
Waiting on you: <numbered exact commands; omit if none>.
```

## Credits
Binding, `resume` and `doctor` come from context-ledger's `context-resume`, by the same author. Treating the prior trail as authoritative and naming the resume point follow the `session-pickup` playbook in pstack's `poteto-mode` by Lauren Tan.

