Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Durable Sessions for the Claude Agent SDK, in One Prompt

Описание и применение

Сессии агента Claude в Dapr Agents сохраняются после сбоев и перезапусков, позволяя возобновлять работу с последнего завершённого шага и удерживать ожидание одобрения в памяти.

Задача

Agents built with Claude often lose progress when a crash or restart occurs, and approval‑gated steps can be lost if they rely on in‑memory state.

Результат

Agents survive crashes and restarts, resume from the last completed step, and approval‑gated steps persist across restarts, enabling reliable long‑running tasks.

Рабочий процесс

  • Install dapr_agents and initialize dapr
  • Define a DurableAgent with a ClaudeAgentExecutor and specify session_store and require_approval
  • Start the agent
  • Assign a multi‑step task to the agent
  • Kill the process mid‑task (e.g., kill -9)
  • Restart the agent and observe session resumption
  • Trigger an approval‑gated tool, close the laptop, and approve later; the wait survives restarts

Доказательства

We shipped a Claude Agent SDK executor in Dapr Agents with durable sessions and human approvals.

Источник

Now break it on purpose, because that's the whole point: Give it a multi-step task. kill -9 the process somewhere in the middle. Start it again. The session resumes where it stopped and the steps already completed come back from the journal, not from re-running Claude.

Источник

  • Дата записи: 2026-10-13T07:56:01.563Z