Long-running agents that stay on course
How to use Jackdaw to keep a multi-day agent on track without micromanaging it.
A long-running agent — a migration, a refactor, a research sweep — drifts across sessions. It forgets the constraints you set on day one, re-proposes approaches you already rejected, and loses track of what's done versus in-progress.
This tutorial shows how to back an agent run with Jackdaw so it resumes where it left off, without drift.
What you'll need
- Jackdaw connected to GitHub (or GitLab), and the Local Codebase source if you want the agent to see your files
- MCP wired to your AI (Claude.ai, Cursor, or Claude Code)
- The task your agent will work on
Step 1: Capture your constraints before you start
Tell the assistant the hard rules for this project, one at a time:
"For the migration project: never modify files in
services/node/src/app/core/directly — those changes go through PR review. Always runpnpm testbefore marking a task complete. Prefer small, atomic commits."
Each one is captured as a typed constraint in the project’s current state. From then on it is surfaced to the agent via get_context when relevant. You set the boundary once; the agent carries it across restarts.
Step 2: Write the project brief
In your wiki, type [[ and create a new page for this run as a Project — something like "Migration: Node → Python services." Fill it in with:
- Goal — one sentence
- Scope — what's in, what's out
- Decisions made — choices already locked in
- Progress — what's done, what's next
The agent can read this page with read_subject. The prose remains yours; the
agent records durable changes as structured facts with remember.
Step 3: Start the agent with a grounded prompt
Your first prompt should make the agent read its context before doing anything:
Step 4: End each session with an update
Before you close a session, have the agent stage the durable changes it learned:
The proposed facts land in your inbox. Approve the accurate ones, and the next session can retrieve them alongside the human-authored brief.
Step 5: Spot-check for drift
At the start of each session:
If the answers are right, you're in sync. If something's off, correct it explicitly so your wiki reflects the truth.
Why this works
The agent may lose its conversational history at a reset, but it keeps access to Jackdaw. The Wiki preserves the project’s current state, the decisions and constraints behind it, and the evidence returned by earlier work. Day six starts from what the team settled on day one — plus everything useful learned since.







