# AI agents need to be replaceable - without losing your work

DevFeed: [AI agents need to be replaceable - without losing your work](<https://devfeed.tech/articles/ai-agents-need-to-be-replaceable-without-losing-your-work-104445.md>)

Original publisher: [Read original article](<https://thenewstack.io/durable-ai-agent-operations/>)

Author: Manveer Chawla

Published: 2026-10-28T13:00:00Z

Content type: article

Language: en

Sources: [The New Stack](<https://devfeed.tech/sources/the-new-stack.md>)

Topics: [long-running](<https://devfeed.tech/topics/long-running.md>), [reliability-engineering](<https://devfeed.tech/topics/reliability-engineering.md>), [Transactions](<https://devfeed.tech/topics/transactions.md>), [API](<https://devfeed.tech/topics/api.md>), [OpenTelemetry](<https://devfeed.tech/topics/opentelemetry.md>), [API Logging](<https://devfeed.tech/topics/api-logging.md>), [Langgraph](<https://devfeed.tech/topics/langgraph.md>)

Tags: [agents](<https://devfeed.tech/tags/agents.md>), [ai](<https://devfeed.tech/tags/ai.md>), [ai-agents](<https://devfeed.tech/tags/ai-agents.md>), [ai-engineering](<https://devfeed.tech/tags/ai-engineering.md>), [api](<https://devfeed.tech/tags/api.md>), [backend-development](<https://devfeed.tech/tags/backend-development.md>), [cdc](<https://devfeed.tech/tags/cdc.md>), [clickhouse](<https://devfeed.tech/tags/clickhouse.md>), [durable-execution](<https://devfeed.tech/tags/durable-execution.md>), [idempotency](<https://devfeed.tech/tags/idempotency.md>), [langfuse](<https://devfeed.tech/tags/langfuse.md>), [payment](<https://devfeed.tech/tags/payment.md>), [post-contributed](<https://devfeed.tech/tags/post-contributed.md>), [sponsor-clickhouse](<https://devfeed.tech/tags/sponsor-clickhouse.md>), [sponsored-post-contributed](<https://devfeed.tech/tags/sponsored-post-contributed.md>)

## AI overview

Make the business operation outlive the agent: before dispatch, commit an authoritative record containing the approved parameters, authorization, provider idempotency key, operation ID, and status. A replacement agent retrieves that record and the tool boundary validates requests against it, so the agent cannot redefine the approved action. LangGraph and Temporal can resume execution, but they cannot determine whether an external side effect completed; retries with the original idempotency key can help prevent duplicate operations. Langfuse traces and ClickStack events can narrow the failure window, but neither proves the provider committed the refund, and asynchronously sent traces may be missing. The provider remains authoritative. Follow an application-defined recovery protocol: confirm completion, wait if pending, retry only after definitive failure and revalidation, and escalate unresolved outcomes. Recheck current conditions and authorization before acting.

## Source excerpt

An agent receives approval to process a partial refund. It sends the request to a payment API, and the process The post AI agents need to be replaceable - without losing your work appeared first on The New Stack.