frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: SafeAgent – exactly-once execution guard for AI agent side effects

3•Lions2026•2h ago
I built a small Python library called SafeAgent that protects real-world side effects when AI agents retry tool calls.

One issue we ran into while experimenting with agent workflows is that retries can trigger irreversible actions multiple times:

agent calls tool ↓ network timeout ↓ agent retries ↓ side effect happens twice

Examples:

• duplicate payment • duplicate email • duplicate ticket • duplicate trade

Most systems solve this ad-hoc using idempotency keys scattered around different services.

SafeAgent centralizes this into a small execution guard.

The idea is simple:

1. every tool execution gets a request_id 2. SafeAgent records the execution receipt 3. retries return the original receipt instead of running the side effect again

Example:

FIRST CALL REAL SIDE EFFECT: sending email

SECOND CALL WITH SAME request_id SafeAgent returns the original execution receipt (no second side effect)

The project is early but includes examples for:

• OpenAI tool calls • LangChain style tools • CrewAI actions

PyPI: https://pypi.org/project/safeagent-exec-guard/

GitHub: https://github.com/azender1/SafeAgent

Curious how other people are handling retry safety for agent side effects.

Comments

Lions2026•1h ago
A bit more context on why I built this.

While experimenting with LLM agents calling tools, I ran into a reliability problem: retries can easily trigger irreversible actions more than once.

For example:

agent → call tool network timeout → retry agent retries tool call side effect runs twice

That can mean:

duplicate payment

duplicate email

duplicate ticket

duplicate trade

Most systems solve this locally with idempotency keys, but in agent workflows the retries can come from multiple layers (agent loops, orchestration frameworks, API retries, etc.).

SafeAgent is a small execution guard that sits between the agent and the side effect. Every tool call gets a request_id, and SafeAgent records a durable execution receipt. If the same request is replayed, it returns the original receipt instead of executing again.

guerython•42m ago
We hit the same failure mode while running agents through n8n. Every tool call writes (request_id, tool, input_hash, response) into Postgres with a unique constraint. The guard query grabs that row first; if it already exists with a success flag we return the stored receipt instead of re-running the side effect. That way retries from the agent loop, HTTP transport, or queue worker may replay the cached payload and skip the duplicate action. Storing the error state alongside the success payload was the hardest bit so we don’t swallow a real failure while pretending it succeeded.

Agentic Coding for Non-Vibe Coders

https://theasymptotic.substack.com/p/agentic-coding-for-non-vibe-coders
1•tipoffdosage904•3m ago•1 comments

Show HN: Render Claude Code and Codex Transcripts as Browsable HTML

https://github.com/forhadahmed/ai-transcript
2•forhadahmed•6m ago•0 comments

Oracle and OpenAI scrap deal to expand flagship Texas data centre

https://www.ft.com/content/2fa83bbf-abf2-43f1-b2f0-84a1391150b9
1•petethomas•6m ago•0 comments

We professional C-suites, lost the battle against vibe-leadership?

1•Bridged7756•7m ago•0 comments

What Production AI APIs Need Beyond Response = LLM(prompt)

https://medium.com/@lei-ye/what-breaks-after-your-ai-demo-works-638ac910f9fa
2•leiishta•8m ago•1 comments

Sem – Semantic version control. Entity-level diffs on top of Git

https://github.com/ataraxy-labs/sem
2•pabs3•8m ago•0 comments

The Vienna Method in Amsterdam

https://watermark02.silverchair.com/desi_a_00379.pdf?token=AQECAHi208BE49Ooan9kkhW_Ercy7Dm3ZL_9Cf...
1•jruohonen•13m ago•0 comments

From Human Ergonomics to Agent Ergonomics

https://wesmckinney.com/blog/agent-ergonomics/
1•kermatt•14m ago•1 comments

One Year of Claude Code

https://www.maxghenis.com/blog/my-claude-code-config/
1•ankitg12•15m ago•0 comments

Rising star chip scientist Jiang Jianfeng leaves MIT for Peking University

https://www.scmp.com/news/china/science/article/3345553/rising-star-chip-scientist-jiang-jianfeng...
4•mikhael•19m ago•0 comments

Push for $40 smartphones builds momentum, but still faces cost hurdles

https://techcrunch.com/2026/03/07/push-for-40-smartphones-builds-momentum-but-still-faces-cost-hu...
2•jnord•22m ago•0 comments

Explosion reported outside US embassy in Oslo, police say

https://www.bbc.com/news/articles/c5yjegg892lo
3•petethomas•24m ago•0 comments

Show HN: Booklet AI – AI-Powered Digital Flipbook Creator

https://bookletai.org/index.html
1•feiyu123456•26m ago•0 comments

Show HN: HireSignal – discover tech hiring signals from social posts (waitlist)

https://www.hiresignal.pro/
1•startupYu•36m ago•0 comments

A blog post series about big integer arithmetic

https://theblessedmachine.substack.com/p/big-integers-writing-and-optimizing
1•Tommyrexx•37m ago•0 comments

Show HN: Strata – 31-43% cheaper Claude Code reads via entropy, no parser

https://github.com/noopz/strata
1•noopz_•38m ago•0 comments

Managers have no human rights (2024)

https://yosefk.com/blog/managers-have-no-human-rights.html
4•signa11•39m ago•0 comments

Beyond the CPU: Why Your Next Computer Needs an NPU

https://techlife.blog/posts/beyond-the-cpu-why-your-next-computer-needs-an-npu/
1•clarkmaxwell•46m ago•0 comments

How to Live Forever

https://internetguy.dev/posts/live-forever/
1•internetguy•46m ago•1 comments

Experiment That Predicted How AI Agents Would Cooperate

https://pub.towardsai.net/information-topology-in-multi-agent-systems-cb925c5b86d9
1•erenkaratas•47m ago•1 comments

Show HN: cryptographic receipts for AI code changes pip install titanate

https://github.com/Rehanrana11/titan-gate-public
1•rmasoodx22•52m ago•1 comments

Show HN: Beecon Infrastructure as Intent, open source IaC built for AI agents

https://beecon.sh
2•gtlpanda•53m ago•0 comments

Show HN: Make AI and automation pipelines fail-closed

https://github.com/OneInX/Manifest-InX-EBS
1•oneinx•57m ago•1 comments

Show HN: Scan0tron – AI screen capture that auto-fills forms ($49)

https://jrdconnect.com
1•jaydurangodev•1h ago•0 comments

PCB devboard the size of a USB-C plug

https://github.com/Dieu-de-l-elec/AngstromIO-devboard
1•zachlatta•1h ago•0 comments

Rethinking Syntax: Binding by Adjacency

https://github.com/manifold-systems/manifold/blob/master/docs/articles/binding_exprs.md
1•owlstuffing•1h ago•1 comments

Velxio, Arduino Emulator

https://velxio.dev/
1•dmonterocrespo•1h ago•1 comments

Fatbikes are wreaking havoc in Sydney's wealthy beach suburbs

https://www.bbc.com/news/articles/cy8l1d221evo
5•randycupertino•1h ago•4 comments

Titan Missile Museum Tour [video]

https://www.youtube.com/watch?v=okeYauThQAU
2•nodesocket•1h ago•0 comments

AI agent freed itself and started mining crypto

https://www.axios.com/2026/03/07/ai-agents-rome-model-cryptocurrency
5•badc0ffee•1h ago•0 comments