ToolsJanuary 11, 2026

Beads + AI Agents: Session Continuity

How to use Beads with AI coding agents (Claude, Cursor, etc.) for persistent task context across sessions.

Each entry keeps the writeup and source together, so the page reads like a clipped page from the archive rather than a detached utility screen.

The implementation

The detail page preserves the practical behavior of the original route: the writeup stays readable, the source remains copyable and syntax highlighted, and the item can still link back into the rest of the catalog.

AI assistants like Claude Code and Cursor lose context between sessions. You end up re-explaining what you were working on, what's blocked, and what's next.

This is what I add to my CLAUDE.md, AGENTS.md, and .cursorrules to leverage Beads while using my coding agent. It tells the agent what to run at session start, how to update task status during work, and how to sync state at session end.

beads-agent-workflow.sh
1# End of session
2bd sync -m "End of session: T3 in progress, T4-T6 ready"
3
4# Start of next session
5bd ready
6bd show <current-task-id>
7bd dep tree <id>
8
9# CLAUDE.md instructions (add to your project)
10## Task Tracking with Beads
11
12Before starting work:
13  bd ready
14  bd show <id>
15
16While working:
17  bd update <id> --status in_progress
18
19After completing:
20  bd close <id> --reason implemented
21  bd sync -m "Completed: <task summary>"
22
23If you discover new work:
24  bd create "New task" -t task -p 2 --json
25  bd dep add <new-id> <parent-id> --type discovered-from
26
27# Session handoff
28bd sync -m "Session end: $(date +%Y-%m-%d)"
29git add -A && git commit -m "docs: update session log"
30git push

More from the lab

Related utilities

View full catalog