Bot-driven sessions that don't redo the last one's work

Long-running agentsDeveloper who runs claude -p from a chat bot on a home PC

I wrote a small Telegram bot that passes my messages to claude -p in a project folder on my desktop. On the train I send 'add the export button', and an hour later 'now fix the test you broke'. Each message is a new headless session, so before ArcRoom the second one had no idea what the first one did.

How do I stop each claude -p call from my chat bot redoing what the last one did?

Set up ArcRoom by running npx arcroom init --agent claude once in the folder your bot uses. Each claude -p call then reads the playbook first: the steps the last session recorded and the last-run note, with what it asked, edited and whether it stopped mid-way. Approve the done-checks once at your desk with arcroom checks approve <code>, so every bot session must pass them before it stops.

Also asked as: Each headless Claude Code session from my Telegram bot starts with no memory. How do I fix it? · How do I pass context between separate claude -p runs? · Can Cursor or Codex pick up what my bot's Claude Code session did?

The work

Run npx arcroom init --agent claude once in the folder the bot uses.

ArcRoom keeps
  • Last-run note
  • Done-checks
The next agent gets

Last session here (Claude Code, 52 min ago):

Step by step

  1. Run npx arcroom init --agent claude once in the folder the bot uses.
  2. Approve the done-checks once at the desk with arcroom checks approve <code>; every bot session must pass them before it stops.
  3. Each claude -p call gets the last-run note: what the last session asked, edited, and whether it stopped mid-way.
  4. Back at the desk, Cursor or Codex in the same folder gets the same note.

What the agent sees

Last session here (Claude Code, 52 min ago):
asked: add the export button to /reports
edited: src/reports/Export.tsx, src/reports/api.ts
stopped mid-way: pnpm test failed (reports.spec.ts)

Compared with today's tools

Claude Code auto memory + --continue

The bot passes --continue so each message resumes the last session, and Claude Code keeps its own memory notes.

Setup
5 min
Ongoing
None, until you switch agent

ArcRoom

Every agent reads the team playbook before it works and writes to it when it finishes. Nothing to update by hand.

Setup
2 min (npx arcroom init)
Ongoing
None

Resuming one session works well inside Claude Code; it doesn't reach Codex or Cursor at the desk, and it doesn't run done-checks before stopping.

Where it stops

ArcRoom sees only the Claude Code sessions, not the bot or your chat history. Prompts leave the machine (first 1,000 characters, redacted); check with arcroom sent.

Try it in your project

Works with the agents your team already uses, and any agent over MCP or the HTTP API.

More in long-running agents