---
title: "Discussion on \"Making an agent's side-effecting tools safe to call twice\" | Hashnode"
description: "Discussion on \"Making an agent's side-effecting tools safe to call twice\". A deterministic key per effect and a small ledger so a tool that opens a PR, posts a comment or sends a message is safe to call twice."
url: "https://hashnode.com/posts/idempotent-side-effects-for-agent-tools/6b0c8e6b20a5d9194c12d8e0"
---

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

Discussion

# [Making an agent's side-effecting tools safe to call twice](https://sandscale.hashnode.dev/idempotent-side-effects-for-agent-tools?utm_source=hashnode&utm_medium=feed)

A deterministic key per effect and a small ledger so a tool that opens a PR, posts a comment or sends a message is safe to call twice.

1d ago · 9 min read · sandscale.hashnode.dev  
Read the article

-   [#ai](https://hashnode.com/tag/ai)
-   [#architecture](https://hashnode.com/tag/architecture)
-   [#api](https://hashnode.com/tag/api)
-   [#typescript](https://hashnode.com/tag/typescript)

## Written by

[Sandscale](https://hashnode.com/@sandscale)

@sandscale

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

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
