golem-atomic-block-ts

Group external side effects for durable replay in TypeScript Golem agents.

Updated May 17, 2026
One-click install
npx skills add https://github.com/Rust-soham/golem-claw --skill golem-atomic-block-ts-rust-soham
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golem-atomic-block-ts
Source: https://github.com/Rust-soham/golem-claw/tree/main/packages/golem/.agents/skills/golem-atomic-block-ts
Command: npx skills add https://github.com/Rust-soham/golem-claw --skill golem-atomic-block-ts-rust-soham

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps you run external, observable side effects safely in a durable TypeScript Golem agent so that recovery after a crash re-executes the right operations together rather than leaving you in a partially-completed state.

Core Features & Use Cases

  • Atomic side-effect grouping: Use atomically to wrap groups of external calls (HTTP, other agents, file/network I/O) so they replay together from the start after failure.
  • Persistence level control: Use withPersistenceLevel to define how oplog entries are interpreted, including advanced authoring scenarios where you implement custom durability and must handle live vs replay explicitly.
  • Idempotency and oplog coordination: Use withIdempotenceMode, oplogCommit, and generateIdempotencyKey to control replay behavior, replication guarantees, and exactly-once-style interactions; optionally adjust behavior via withRetryPolicy.

Quick Start

Ask for an atomic, durable TypeScript pattern that retries a failing HTTP call and groups multiple external side effects so they replay together after a crash.

Frequently Asked Questions about golem-atomic-block-ts

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make TypeScript side effects replay-safe across crashes?

To make TypeScript side effects replay-safe across crashes, you can group external operations into atomic blocks so that recovery after a failure re-executes the entire block from the start rather than leaving partially completed state.

What is durable execution and when do I need it for external calls?

Durable execution ensures external side effects like HTTP or network I/O operations survive crashes. You need it when grouping multiple observable operations so they replay together from the beginning during recovery.

How do I group multiple HTTP calls so they retry together after a failure?

You group multiple HTTP calls by wrapping them in an atomic block using a TypeScript Golem agent, ensuring that all observable side effects replay together from the start if a crash occurs before completion.

How do idempotency keys prevent duplicate side effects during crash recovery?

Idempotency keys prevent duplicate side effects during crash recovery by allowing oplog replication and replay behavior to enforce exactly-once style interactions, ensuring external systems do not process the same operation twice.

Does Golem support custom persistence levels for oplog entries?

Yes, Golem supports custom persistence levels for oplog entries, allowing you to define how entries are interpreted and explicitly handle live execution versus replay scenarios in advanced authoring situations.

What are the limitations of using atomic blocks for side effect durability?

A limitation of using atomic blocks is that you must explicitly handle live versus replay execution when using custom persistence levels, and complex retry policies may require careful oplog coordination to avoid unexpected replay behavior.