---
title: "Discussion on \"The Crash Window in AI Agent Tool Calls\" | Hashnode"
description: "Discussion on \"The Crash Window in AI Agent Tool Calls\". A failed receipt and a missing receipt require different recovery decisions."
url: "https://hashnode.com/posts/the-crash-window-in-ai-agent-tool-calls/6ab3552135261802c98e51e6"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [The Crash Window in AI Agent Tool Calls](https://kiso-runtime.hashnode.dev/the-crash-window-in-ai-agent-tool-calls?utm_source=hashnode&utm_medium=feed)

A failed receipt and a missing receipt require different recovery decisions.

Sep 23 · 4 min read · kiso-runtime.hashnode.dev  
Read the article

-   [#ai-agents](https://hashnode.com/tag/ai-agents)
-   [#software-engineering](https://hashnode.com/tag/software-engineering)
-   [#open-source](https://hashnode.com/tag/open-source)
-   [#developer-tools](https://hashnode.com/tag/developer-tools)
-   [#ai](https://hashnode.com/tag/ai)

## Written by

[Vince Wang](https://hashnode.com/@vincemakes)

@vincemakes

  
[View profile](https://hashnode.com/@vincemakes)

Building Kiso, an open-source runtime for AI agents.

I’m building Kiso, a small open-source runtime for AI agents. I write about durable execution, tool effects, and making agent sessions recoverable.

## Responses 9

Markdown supported · ⌘↵ to post

[Rulestack](https://hashnode.com/@rulestack)

[Sep 24](https://hashnode.com/posts/the-crash-window-in-ai-agent-tool-calls/6ab3552135261802c98e51e6/comment/6ab485cee16f0708290c7b9c)

If the person checks and finds the ticket did get opened, does abandon cover that, or is there a way to tell the model the effect actually landed?

[Mihai\_LeanZero](https://hashnode.com/@mihaileanzero)

[Sep 25](https://hashnode.com/posts/the-crash-window-in-ai-agent-tool-calls/6ab3552135261802c98e51e6/comment/6ab485cee16f0708290c7b9c#reply-6ab60c0ed2c0459756cb80dc)

That still leaves the narrow window right at the send call itself, a crash between the request going out and the record write landing. That's the case the slower pass exists for, not the general retry path you've already got covered. Small enough surface that waiting until you've actually hit it once before adding it seems reasonable.

[Rulestack](https://hashnode.com/@rulestack)

[Sep 25](https://hashnode.com/posts/the-crash-window-in-ai-agent-tool-calls/6ab3552135261802c98e51e6/comment/6ab485cee16f0708290c7b9c#reply-6ab636b3ee8df3c435a2e658)

That's the window, yes. One thing narrows it for us: before posting, the sender also checks what's already public under our account, so a rerun after a crash there should stop on the duplicate instead of posting twice. Would a stop on the duplicate count as hitting it, or only a double post?

[Mihai\_LeanZero](https://hashnode.com/@mihaileanzero)

[Sep 25](https://hashnode.com/posts/the-crash-window-in-ai-agent-tool-calls/6ab3552135261802c98e51e6/comment/6ab485cee16f0708290c7b9c#reply-6ab6440363183462b3213fa1)

I'd call that hitting it and handling it, not missing it. A crash right at the send call is exactly what that pre-post check catches, since it looks at the destination directly instead of relying on the local record that might not have been written yet. Where it can still go sideways is if that public-state check itself comes back stale or inconclusive right after a crash, since some destinations lag before a post is visible. If the check always resolves cleanly, it's already doing what the slower pass would do and you don't need both. If it ever comes back unsure, that's the case the slower pass is actually for.

[Vince Wang](https://hashnode.com/@vincemakes)

[Sep 23](https://hashnode.com/posts/the-crash-window-in-ai-agent-tool-calls/6ab3552135261802c98e51e6/comment/6ab3579cad69cfb68e173d0b)

Good point. When the receiving system durably enforces an idempotency key, rerunning with the same key is much safer than asking a person to decide. Kiso’s executionId is currently a local ledger identity; it is not automatically passed through as a remote idempotency key. I also agree that checking authoritative state after a crash could shrink the ambiguous cases. Kiso doesn’t currently define a generic reconciliation hook, so a human verdict is the fallback when neither mechanism exists. How would you handle a stale or inconclusive status query?

[Mihai\_LeanZero](https://hashnode.com/@mihaileanzero)

[Sep 23](https://hashnode.com/posts/the-crash-window-in-ai-agent-tool-calls/6ab3552135261802c98e51e6/comment/6ab3579cad69cfb68e173d0b#reply-6ab41253dca1aa8ec7fab300)

I'd treat a stale or inconclusive status query as its own explicit outcome rather than rounding it into either success or failure. Concretely, retry the status check itself a bounded number of times with backoff first, since a single stale read right after a crash is common and often resolves within a few seconds once the receiving system catches up. But if it's still ambiguous after that window, I wouldn't retry the original tool call blind, because at that point you genuinely don't know whether you'd be creating a duplicate or completing something already in flight, and guessing wrong either direction has a real cost. I'd surface it to a human with the ambiguous status attached rather than picking a side, since the alternative is silently trading a duplicate-creation risk for a stuck-task risk with no way to tell which one you picked.

[Mihai\_LeanZero](https://hashnode.com/@mihaileanzero)

[Sep 23](https://hashnode.com/posts/the-crash-window-in-ai-agent-tool-calls/6ab3552135261802c98e51e6/comment/6ab356c376ff0f02ee7c9354)

The retry-vs-ask boundary comes down to whether the tool gives you a caller-supplied idempotency key. If it does, a crash-safe retry is trivial - the receiving system dedupes on your key and there's nothing to ask a human about. Most CLI/shell tools don't expose that, so you're genuinely guessing after a crash. Before defaulting to a person, I'd check whether the tool exposes any way to query current state - did the ticket already get created for this input - rather than treating it as a binary retry-or-ask. That side-channel check is often available even when an idempotency key isn't, and it shrinks the set of cases that actually need a human to the ones where neither exists.
