Working State.
Field notesEngineering / December 2026

Building production agents

When can an agent
say “done”?

The calendar saved the invite. The connection dropped before the agent got an answer. What should the person looking at the spinner see next?

Here’s a test I’d ask for in an agent demo. Type “Invite Maya to a 30-minute design review Thursday at 3 on my work calendar.” Let the assistant resolve which Maya, show the date and time zone, and get the go-ahead. Then drop the calendar service’s response on the way back. Leave the user’s screen up.

The interesting part is what happens when the user closes the app, opens it again and says, “Actually, make it 3:30.” They’re entitled to think they’re moving a meeting. Somewhere in the system there may still be a worker trying to create the 3 o’clock version.

Give the next worker something to look up

Before making the first write, I’d save exactly what the user approved, down to the work calendar, Maya’s resolved address, the start and end, the time zone, and whether the service should notify her. In my permission-memory study, one agent summary turned an instruction to ask first into a claim that the user had approved. I’d want the worker picking up this invite to have the original approval in hand. The observed handoff

I’d assign the operation an ID and choose an event ID in advance. The first identifies this particular instruction. The second identifies the meeting, which will still be the same meeting if it moves half an hour.

That distinction buys you something concrete after a restart. The next worker can look up the event on the right calendar by ID. Searching for “Design review” is a reasonable thing for a person to do. It’s a lousy way for software to decide which of two meetings it’s about to move. Google Calendar supports caller-supplied event IDs for precisely the case where a create succeeds and its response gets lost. Calendar event creation guide

I’d keep the operation ID, attempt times and provider response code in the support trace. A person investigating a duplicate can follow those across a restart without pulling Maya’s address or the meeting description into general-purpose logs.

Write the sentence for the uncertain case

“I’m checking whether the 3 o’clock invite went through. You can close this window.”

I’d use that line only if a background worker really will keep checking. An immediate lookup can come back empty while the original request is still in flight. If the provider supports a safe retry and the instruction still stands, the worker can retry the identical request with the same identifier. With a provider that offers neither a reliable lookup nor a safe retry, I’d stop and show which calendar needs checking. A fresh attempt with a fresh ID is how Maya ends up with two invites.

Once the worker finds the matching event, the copy gets easier. “Thursday at 3 is on your work calendar, with Maya listed as a guest.” Link to the event. Whether Maya received a notification or accepted the invitation is a different question. The event record tells you exactly how much of that sentence you can defend.

Now move it to 3:30

The correction supersedes the queued 3 o’clock work. I’d record that before dispatching another write and have workers check it before retrying. A request already on the wire can still land. If it did, update that event. If the earlier create definitively failed, create the corrected meeting. While the outcome is unresolved, keep the correction pending against the same event. Asking the user to repeat it just hands them the bookkeeping.

The edit gets its own operation ID. If someone has changed the event directly on the calendar, a conditional update lets the worker discover the conflict before it overwrites their edit. Read the current event again. A new room can coexist with the requested time change. Discovering that the organizer canceled the meeting calls for a question. Google Calendar’s conditional updates

The test I’d run before shipping

I’d give a fake calendar two switches. One drops the request before saving. The other saves the event and drops the response. Both return the same timeout to the agent. Run each case again with a worker restart and the 3:30 correction. Then inspect the calendar and its notification log alongside the transcript.

I want one event at the final requested time. A real reschedule may legitimately notify Maya of a change. Retrying the original create should never generate a second invitation for the same event. I’d also keep the case where nothing was saved on the first attempt. An agent that leaves the user staring at “checking” forever deserves to fail that one.

My favorite assertion in that test would be on the link in the final chat message. Open it as the organizer. Is that Maya, on the right calendar, on Thursday at 3:30? That’s the bit of the demo I’d want to see.