A CLAUDE.md task workflow that survives sessions
Agents follow what's in CLAUDE.md (Claude Code) or AGENTS.md (Codex, Cursor and others). A few lines there decide whether a new session starts from zero or picks up where the last one stopped.
The snippet
## Tasks (Taskhold)
The human and I share a task list through the taskhold MCP tools.
- Session start: taskhold_get_current; if nothing is in progress, taskhold_list status:todo and take the highest priority.
- taskhold_start before working on a task; taskhold_add_note as you go.
- Can't continue? taskhold_block with the reason. Done? taskhold_complete with a short summary.
- Found a TODO or a bug you aren't fixing now? taskhold_create (or taskhold_create_from_todo with file and line).It assumes the Taskhold MCP server is connected. The same structure works with any task tool your agent can reach.
Why each line is there
- get_current first: a session that ended mid-task left it in progress. Checking first stops the agent from starting something new and abandoning it.
- Highest priority todo: you decide order in the web app; the agent doesn't have to guess.
- start before work: marks the task as claimed, so another agent doesn't take it.
- add_note as you go: if the session dies, the next one reads the notes instead of redoing the investigation.
- block with the reason: turns "I'm not sure what you want" into a question you see in one place.
- complete with a summary: what changed, in a sentence, attached to the task.
- create / create_from_todo: things the agent notices but shouldn't fix now become tasks instead of comments nobody reads.
Variations
- One repo of several: "Only take tasks in project <name>."
- Review gate: "Never complete a task that changes the database schema; block it for review instead."
- Several agents: "Start every note with your client name."
Give your agents a list you can both see.
$12 a month or $120 a year per person, every agent included. 7-day trial with a card; cancel before it ends and nothing is charged.
Start your 7-day trialQuestions
- Where does the file go?
- CLAUDE.md in the project root (or ~/.claude/CLAUDE.md for all projects) for Claude Code; AGENTS.md in the project root for Codex and other agents that read it; Cursor also reads rules in .cursor/rules.
- Do I have to write it myself?
- No. Taskhold's setup URL gives the agent this snippet along with the server config.
Related
Updated 2026-10-08