morillo

Durable Claude Agent — Data skill for Claude Code

Data community

Claude text-to-SQL analyst over a governed lakehouse, run as a Temporal workflow: human-approval gate, deterministic policy enforcement, crash recovery, MCP tools, eval harness, OpenTelemetry to Phoen.

How to install Durable Claude Agent

This entry records only its repository, not the path inside it, so there is no exact command to give. Open morillo/durable-claude-agent and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Durable Claude Agent does

Claude text-to-SQL analyst over a governed lakehouse, run as a Temporal workflow: human-approval gate, deterministic policy enforcement, crash recovery, MCP tools, eval harness, OpenTelemetry to Phoenix

Alternatives in Data

  • Skill Production Pipeline — Claude-skills — Effective: 2026-03-07 Applies to ALL new skills, improvements, and deployments 5.3k ★
  • 12 Services Layer — Prompt 12: Wire Up Services Layer (Analytics, Policy, Settings, Sessions) 2.3k ★
  • Aoci Code — Local-first MCP server + CLI in Go: a persistent, governed codebase index that distills code and database sche 443 ★

README

durable-claude-agent

[![CI](https://github.com/morillo/durable-claude-agent/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/morillo/durable-claude-agent/actions/workflows/ci.yml)

**A Claude text-to-SQL analyst over a governed lakehouse, run as a Temporal workflow.** Every step gets retries, timeouts, and crash recovery; risky queries stop at a human-approval gate; a deterministic policy engine, not the model, decides what is risky; and an evaluation harness scores SQL correctness, tool use, retrieval, and gate behavior through the real workflow. Everything runs on a laptop with the Anthropic API as the only cloud dependency.

![crash recovery demo](docs/demo/crash-recovery.gif)

*The demo moment: the worker is killed mid-reasoning, a fresh worker resumes from the checkpoint, and the run finishes with no completed step repeated.*

The two-minute pitch

An enterprise that wants an LLM analyst over its warehouse has three questions before "does it write good SQL": *what stops it from reading what it must not*, *what happens when it fails halfway*, and *how do we know it is getting better*. This repo answers each with a specific mechanism and shows the mechanism working:

  • Governance is enforced in code, not in prompts. Generated SQL is parsed with sqlglot, columns are resolved against the live schema, and policy rules from governance/policies.md classify it safe, needs_approval, or blocked. The model's own risk opinion is recorded and ignored for control flow. The execution tool checks a capability token the model never holds and reclassifies before running. Two independent controls must fail before the model can execute anything.
  • Durability comes from Temporal, idempotency from the activities. A run survives a worker crash with zero processes alive, resumes a half-finished Claude tool loop from heartbeat checkpoints, waits hours for an approver without holding memory, and leaves a replayable history. The RE