Session Expiry for AI Agents: Release Stale Holds and Drafts
How to set session timeout and expiry rules so an AI agent releases pending holds, drafts and open conversations and asks a person before resuming.

An AI agent session timeout is a rule that closes an open working session after a defined period of inactivity or total elapsed time, releases whatever the agent was holding on behalf of the business (a reserved slot, an unsent draft, a pending approval, a half finished conversation) and requires a person to confirm before the work resumes. The useful version is not one global timer. It is a short table of expiry windows, one per artifact type, each with a named release action and a named owner who gets told.
Key takeaways
- A timeout that only stops the loop is incomplete. Expiry must also release the commitments the agent made while the loop was running.
- Set expiry per artifact: a chat thread, a draft reply, a reserved appointment and a pending refund approval deserve very different windows.
- Expiry should be loud. Releasing a hold silently is how a customer learns about it at the worst moment.
- Resuming after expiry is a new decision, not a continuation. Require a person to confirm that the original intent still holds.
- Log every expiry with the artifact, the reason, the release action taken and who was notified, so you can tune windows with evidence instead of guesses.
What exactly expires when an agent session ends?
Most teams think of a session as a conversation. In an operating agent, a session is a bundle of four different things, and each one leaks differently when it is abandoned.
First, the conversation state: the thread with a customer or colleague, the context the agent loaded, the working plan. Left open, it mostly costs clarity. The agent returns hours later and answers a question nobody remembers asking.
Second, drafts and artifacts: the reply not sent, the quote not delivered, the ticket note not posted. Left open, these rot. A draft written against Tuesday's inventory is wrong on Friday, but it still looks finished and ready to send.
Third, holds and reservations: a slot blocked on a calendar, stock reserved, a seat held in a class, a case assigned but untouched. These are commitments against a scarce resource. Every stale hold removes capacity you could have sold or served.
Fourth, pending approvals: an action the agent prepared and parked at a human approval gate, waiting for someone to click. Left open, approvals become a quiet queue of decisions whose context has expired. Approving a three day old refund request based on a one line summary is not a review, it is a coin flip.
A session expiry policy covers all four. If yours only cancels the model loop, you have built a stop button, not an expiry rule. For the mechanics of stopping cleanly mid run, see agent timeouts and cancellation.
Why stale holds cost more than stale chats
An abandoned conversation is an annoyance. An abandoned hold is a liability, for three reasons.
It consumes capacity invisibly. Nobody files a complaint about a slot that was never released, because nobody knows it existed. The symptom shows up as a fully booked week that somehow produced light revenue.
It creates false promises. A customer who was told "I am holding that for you" has a reasonable expectation. If the agent's session died in the middle, the business has made a promise nobody is tracking.
It corrupts downstream data. Reports, forecasts and routing rules all read the same reservation tables. Stale entries bias every decision made on top of them.
This is why expiry windows should be tightest on anything that reserves a scarce resource, and loosest on anything that is purely informational.
How long should each window be?
Use this as a decision guide. Start with the shortest window you can defend, then lengthen it only when you can point to real cases where the short window hurt someone.
- Open conversation with a human present: expire on inactivity measured in minutes. A person who walked away will start again, and starting again is cheap.
- Open conversation with no human present (internal research, triage): expire on total elapsed time measured in minutes to an hour, because nobody is waiting for a reply.
- Draft that depends on live data (price, stock, availability, schedule): expire in hours, and mark it invalid rather than deleting it, so the agent can regenerate rather than guess.
- Draft that depends on stable facts (policy explanation, onboarding note): expire in days, but revalidate against the source before sending.
- Hold on a scarce resource (slot, seat, stock, equipment): expire fast, in minutes, and always release rather than extend by default.
- Pending approval for a low risk action: expire in a working day and route the decision to a named backup.
- Pending approval for a high risk or irreversible action (payment, deletion, external commitment, legal text): expire in a working day and cancel rather than escalate. The agent prepares it again under fresh review.
- Scheduled or recurring run that overlaps its own next start: expire the older run immediately and let the newer one proceed.
Two rules make the table safer. Never let an agent extend its own hold more than once without a person, and never let expiry be the only thing holding a commitment open, because a timer that fails silently fails in the direction of the hold staying put.
A step by step plan to add expiry to an agent already in production
You can add this to a running agent without a rebuild. Work in this order.
1. Inventory what the agent can hold. Walk every tool it can call and write down which ones create something that persists after the run ends: a record, a reservation, a draft, a queued approval, an assignment. 2. Give each of those artifacts an identifier and a created time, stored outside the model context. If the agent cannot name the thing it created, nothing can expire it. 3. Attach a release action to each artifact type. "Release" means a specific operation: cancel the reservation, mark the draft invalid, unassign the case, withdraw the approval request. Write the exact tool call. 4. Set the first window for each type using the guide above. Record the windows in your harness configuration, not in the prompt, so changes are reviewable. 5. Build the sweeper. A small recurring job reads open artifacts, finds the ones past their window, performs the release action and writes a log line. Make it idempotent so a double run cannot double cancel. Provider documentation on idempotent requests is a good model for the request keys here. 6. Add notification. Every release sends one message to a named human owner and, where a promise was made outward, one message to the person who was promised. Expiry without notification is just a quieter failure. 7. Add the resume gate. When an expired session is picked up again, the agent must restate what it was doing, what was released, and ask a person to confirm the goal is still valid before taking any action. 8. Review weekly for the first month. Count expiries by type and cause. Shorten windows that never fire. Lengthen windows that fire on work that was legitimately still in progress.
Steps 2 and 7 are where most setups fail. Recovering mid task is far easier when the agent writes verified state as it goes, which is the argument for checkpoints that let long work resume.
What the agent should do at the exact moment of expiry
Treat expiry as a short, fixed ritual rather than an exception. The same four moves, every time.
- Release first, explain second. Perform the release action before writing any message, so a failed notification cannot leave the hold in place.
- Write the record: artifact identifier, type, created time, expiry window, cause (inactivity, elapsed time, overlap, missing approval), release action performed, result.
- Notify the owner in one plain message that says what was held, what was released, and what a person should do if the work still matters.
- Preserve the reasoning, discard the authority. Keep notes and partial work so nothing has to be rediscovered, but drop any permission or reservation the session carried.
Then stop. The agent should not immediately reopen the task, re reserve the slot or regenerate the draft. Reopening is a decision for a person, and that boundary is what keeps a timer from turning into a loop.
Illustrative scenario: the slot nobody claimed
The following is an illustrative example, not a client case.
A services company runs a scheduling agent on its website and on WhatsApp. A visitor asks about an installation visit on Thursday morning. The agent checks availability, places a soft hold on the slot, and asks for an address to confirm. The visitor closes the tab.
Without expiry, Thursday morning stays blocked. The next three callers are told Thursday is full. The dispatcher sees a booked slot with no customer attached and leaves it alone, assuming someone else owns it.
With expiry, the hold carries a short inactivity window. The sweeper releases it, logs the cause as inactivity, and posts one line to the scheduling channel noting the slot is open again and the visitor never confirmed. The slot returns to availability within minutes. If the visitor comes back the next day, the agent does not silently resume: it says the earlier hold was released, checks live availability, and asks whether Thursday still works. Nothing was promised that the business could not keep.
What to log, and how Be Human handles this
Expiry is only tunable if it is measured. Keep a weekly count of expiries by artifact type and cause, the share of expired items that a person later revived, and the age distribution of currently open holds. The second number tells you whether your windows are too short. The third tells you whether the sweeper is actually running. These belong in the same signal set as your other harness health checks.
Be Human builds expiry rules into the harness during a first engagement rather than leaving them to prompt instructions. For the one role being defined, we list every artifact the agent can create or hold, attach a release action and an owner to each, set initial windows, run the sweeper on a schedule, and include expiry counts in recurring evaluations so windows get adjusted with evidence. Managed operations cover the monitoring, the review of those windows as volume changes, and incident response when a release fails.
If you are not sure which of your open commitments an agent should be allowed to hold at all, the free Be Human AI diagnostic is a straightforward way to find the first task worth handing to an agent.
Frequently asked questions
What is the difference between a session timeout and a step limit? A step limit caps how much work a single run may do, in tool calls, tokens or time, and it protects you from runaway loops. A session timeout governs how long a session's artifacts and commitments stay valid after the run stops. You need both: one bounds the activity, the other bounds the aftermath.
Should an expired session be resumed automatically if the user comes back? No. Treat the return as a new request that may reuse old notes. Automatic resume is how an agent acts on stale prices, released slots or approvals whose context no longer applies. Have the agent state what was released, revalidate the facts, and ask for confirmation before acting.
How do I avoid expiring work that was legitimately still in progress? Make progress visible. If a long task writes a checkpoint or a heartbeat as it advances, the sweeper can distinguish an active run from an abandoned one and reset the clock on genuine activity. Where that is not possible, use a longer window for the artifact and a short window for the hold it depends on.
Who should be notified when a hold is released? One named internal owner for the queue, always, plus the external person if a promise was made to them. Avoid broadcasting to a channel nobody owns, because unowned notifications are ignored within a week. If a release requires an apology or a reschedule, the notification should say which of the two is needed.
Your next step
See where an AI agent fits in your company first.
Take the free Be Human AI diagnostic. A few questions about your work show which task to hand to an agent first, what it needs to know and where a person approves.
Be Human editorial guidance. Examples are illustrative unless explicitly attributed. Sources provide background; implementation choices depend on your workflow.


