Guide
Long-running AI agents: how teams run tasks that take hours or days
Long-running AI agents work on a single task for hours, days or longer instead of answering in one turn. Running one well takes three things a chat does not have: recovery from failures without a person pressing retry, a record anyone can rewind to see what happened, and a way for a teammate who was away to see what changed since they last looked.
Why long tasks break single-player AI
A chat answer is done in seconds, so nobody needs to catch up on it and nothing goes wrong halfway through. A task that runs overnight is different. The model provider has a bad twenty minutes, a rate limit resets on the hour, the person who started it goes home, and somebody else needs to know in the morning where it got to.
Work at that scale also pulls in more than one person, which is exactly what a private chat window cannot accommodate.
Surviving failures
Some failures are fixed by waiting: an outage, a timeout, a rate limit. A long-running agent should record the failure, wait, and pick itself up again, rather than stopping until somebody notices the next day. Other failures are not fixed by waiting, such as a rejected API key or spent credit, and retrying those only costs money. Those should stop and ask a person.
Retries should be capped on lack of progress rather than on total time, so a task that loses one step to an outage every few hours keeps going as long as it keeps getting somewhere.
Keeping people informed without noise
A notification for every step teaches people to ignore notifications. The ones worth sending are the moments a person has to decide something: the agent is stuck and asking, a result is ready for review, the task failed, work was handed to you.
Catching up and rewinding
The person who joins on Thursday should not have to ask what happened on Tuesday. Two views make that possible: a summary of what changed since that person last looked, and a replay of the session's history that shows its state at any moment, including who was in it and what the agent had been told.
How Vrittara does it
Vrittara sessions run on the server, not in somebody's browser tab. A failure that waiting can fix is recorded with its reason and a time the task will resume on its own, up to five times in a row without progress, and progress resets the count. Failures waiting cannot fix stop the task and ask a person.
Notifications go out for decisions only: a task assigned to you, an agent needing input, a result ready for review, a failure, a mention or a handoff to approve. Each session keeps a full event history you can scrub through, and a catch-up view counts what changed since you last looked and lists what needs a person.
Related guides
Common questions
- What is a long-running AI agent?
- An AI agent that works on one task over hours or days, taking many steps, rather than answering in a single turn. Research, incident investigations and deal preparation are typical examples.
- What happens when a long-running agent task fails overnight?
- It depends on the failure. A temporary one, like a provider outage or rate limit, should be retried automatically after a wait. A permanent one, like a rejected key or spent credit, should stop and ask a person.
- How does a teammate catch up on an agent task they missed?
- In a shared session they open a summary of what changed since they last looked, or rewind the session's history to see its state at any point, instead of reading the whole log.