Golem test crash recovery

From golemcloud/golem · View interactive version

Golem test crash recovery is an AI agent skill from the GitHub repository golemcloud/golem. Simulating a crash on an agent for testing crash recovery. Use when testing durable execution, verifying state recovery after failures, or validating that an agent correctly resumes from its operation log.

How to use this skill

Skill file

Testing Crash Recovery

Both golem and golem-cli can be used — all commands below work with either binary.

The <AGENT_ID> format depends on the agent's language — refer to the language-specific invocation skills for the exact syntax.

`agent simulate-crash` — Simulate a Crash

Simulates a crash on an agent for testing purposes. The agent starts recovering and resuming immediately by replaying its operation log.

This is useful for verifying that an agent's durable state is correctly persisted and that it can recover from unexpected failures without data loss.

golem agent simulate-crash <AGENT_ID>

What Happens

  1. The agent's execution is interrupted (simulating a process crash)
  2. The agent immediately begins recovery by replaying its operation log
  3. Once recovery completes, the agent resumes normal operation

Replay is slow? Don't try to skip oplog writes. Durable agents always write to the oplog by design — there is no way to opt out of persistence for a durable agent. If recovery is slow because the oplog has grown large (long-running agents, frequent state changes, heartbeats, polling loops, recurring tasks), the correct fix is snapshot-based recovery: enable periodic snapshotting so recovery starts from the latest snapshot instead of replaying the full history. See the language-specific golem-custom-snapshot-* skill.

When to Use

Examples

Simulate a crash on an agent:

golem agent simulate-crash <AGENT_ID>

Typical test workflow — invoke a method, simulate a crash, then verify state is preserved:

golem agent invoke <AGENT_ID> <METHOD> [ARGS]
golem agent simulate-crash <AGENT_ID>
golem agent invoke <AGENT_ID> <GETTER_METHOD>
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.