Agent skill

Output Error Nondeterminism

by growthxai in growthxai/output

Fix non-determinism errors in Output SDK workflows. An agent skill from growthxai/output.

Apache-2.0Auto-check: notesDevelopment

Install Output Error Nondeterminism

skills CLI
$ npx skills add growthxai/output --skill output-error-nondeterminism -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install growthxai/output output-error-nondeterminism --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/growthxai/output.git skills-src && mkdir -p .claude/skills && cp -r skills-src/coding_assistants/claude/plugins/outputai/skills/output-error-nondeterminism .claude/skills/output-error-nondeterminism && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
output-error-nondeterminism
GitHub stars
442
Token cost
~1.6k tokens
SKILL.md length
366 words
Files
1
Skills in repo
50
Repo updated
First seen
Licence
Apache-2.0

At a glance

Fix non-determinism errors in Output SDK workflows. An agent skill from growthxai/output.

  • Works in 5 steps: Math.random() → Date.now() / new Date() → crypto.randomUUID() → …
  • Seeing replay failures
  • SKILL.md covers Overview, When to Use This Skill, Root Cause and Common Causes and Solutions, plus 5 more sections
  • Calls npx

What it does

Output Error Nondeterminism is an agent skill from growthxai/output. Fix non-determinism errors in Output SDK workflows. Use when seeing replay failures, inconsistent results between runs, "non-deterministic" error messages, or workflows behaving differently on retry.

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development. The repository describes itself as: The open-source TypeScript framework for building AI workflows and agents. Designed for Claude Code describe what you want, Claude builds it, with all the best practices already… The licence is Apache-2.0.

When your agent uses it

  • Seeing replay failures
  • Inconsistent results between runs
  • Non-deterministic error messages
  • Workflows behaving differently on retry

Example prompts

  • “non-deterministic”
  • “/output-error-nondeterminism”

Requirements

  • Node.js
  • Pre-approved tools (allowed-tools): Bash, Read

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Math.random()
  2. Date.now() / new Date()
  3. crypto.randomUUID()
  4. Dynamic Imports
  5. Environment Variables

What it can do on your machine

Read from SKILL.md and the folder at commit 99ee298. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash
    • Read

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Output Error Nondeterminism loads about 1.6k tokens when it runs. Until then it costs about 57 tokens; SKILL.md has 366 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~57
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, Read

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from growthxai/output at commit 99ee298, republished under its Apache-2.0 licence (© growthxai). 366 words, ~1,606 tokens.

Download SKILL.mdSave it as .claude/skills/output-error-nondeterminism/SKILL.md (or your agent's skills folder).
name
output-error-nondeterminism
description
Fix non-determinism errors in Output SDK workflows. Use when seeing replay failures, inconsistent results between runs, "non-deterministic" error messages, or workflows behaving differently on retry.
allowed-tools
Bash, Read

Fix Non-Determinism Errors

Overview

This skill helps diagnose and fix non-determinism errors in Output SDK workflows. Workflows must be deterministic because Temporal may replay them during recovery or retries, and the replay must produce identical results.

When to Use This Skill

You're seeing:

  • "non-deterministic" error messages
  • Replay failures after workflow restart
  • Inconsistent results between runs with same input
  • Errors during workflow recovery
  • Warnings about determinism violations

Root Cause

Temporal workflows must be deterministic: given the same input, they must always execute the same sequence of operations. This is because Temporal replays workflow history to recover state after crashes or restarts.

Non-deterministic operations break this replay mechanism because they produce different values each time.

Common Causes and Solutions

1. Math.random()

Problem: Random values differ on each execution.

typescript
// WRONG: Non-deterministic
export default workflow( {
  fn: async input => {
    const id = Math.random().toString( 36 );  // Different each time!
    return await processWithId( { id } );
  }
} );

Solution: Pass random values as workflow input or generate in a step.

typescript
// Option 1: Pass as input
export default workflow( {
  inputSchema: z.object( {
    id: z.string()  // Generate ID before calling workflow
  } ),
  fn: async input => {
    return await processWithId( { id: input.id } );
  }
} );

// Option 2: Generate in a step (steps can be non-deterministic)
export const generateId = step( {
  name: 'generateId',
  fn: async () => ( { id: Math.random().toString( 36 ) } )
} );

export default workflow( {
  fn: async input => {
    const { id } = await generateId( {} );
    return await processWithId( { id } );
  }
} );
2. Date.now() / new Date()

Problem: Timestamps change between executions.

typescript
// WRONG: Non-deterministic
export default workflow( {
  fn: async input => {
    const timestamp = Date.now();  // Different each replay!
    return await logEvent( { timestamp } );
  }
} );

Solution: Pass timestamps as input or use Temporal's time API.

typescript
// Option 1: Pass as input
export default workflow( {
  inputSchema: z.object( {
    timestamp: z.number()
  } ),
  fn: async input => {
    return await logEvent( { timestamp: input.timestamp } );
  }
} );

// Option 2: Generate in a step
export const getTimestamp = step( {
  name: 'getTimestamp',
  fn: async () => ( { timestamp: Date.now() } )
} );
3. crypto.randomUUID()

Problem: UUIDs differ each execution.

typescript
// WRONG: Non-deterministic
import { randomUUID } from 'crypto';

export default workflow( {
  fn: async input => {
    const requestId = randomUUID();  // Different each time!
    return await makeRequest( { requestId } );
  }
} );

Solution: Generate UUIDs as input or in steps.

typescript
// Correct: Generate in step
export const generateRequestId = step( {
  name: 'generateRequestId',
  fn: async () => {
    const { randomUUID } = await import( 'crypto' );
    return { requestId: randomUUID() };
  }
} );
4. Dynamic Imports

Problem: Dynamic imports may resolve differently.

typescript
// WRONG: Non-deterministic import timing
export default workflow( {
  fn: async input => {
    const module = await import( `./handlers/${input.type}` );
    return module.handle( input );
  }
} );

Solution: Use static imports and conditional logic.

typescript
// Correct: Static imports with conditional use
import { handleTypeA } from './handlers/typeA';
import { handleTypeB } from './handlers/typeB';

export default workflow( {
  fn: async input => {
    if ( input.type === 'A' ) {
      return await handleTypeA( input );
    } else {
      return await handleTypeB( input );
    }
  }
} );
5. Environment Variables

Problem: Environment may differ between replays.

typescript
// WRONG: Environment can change
export default workflow( {
  fn: async input => {
    const apiUrl = process.env.API_URL;  // May differ on different workers
    return await callApi( { url: apiUrl } );
  }
} );

Solution: Pass configuration as input or use constants.

typescript
// Correct: Pass as input
export default workflow( {
  inputSchema: z.object( {
    apiUrl: z.string()
  } ),
  fn: async input => {
    return await callApi( { url: input.apiUrl } );
  }
} );

How to Find Non-Deterministic Code

Search for Common Patterns
bash
# Find Math.random usage
grep -rn "Math.random" src/workflows/

# Find Date.now or new Date
grep -rn "Date.now\|new Date" src/workflows/

# Find crypto random functions
grep -rn "randomUUID\|randomBytes" src/workflows/

# Find dynamic imports
grep -rn "import(" src/workflows/
Show full SKILL.md (152 more words)Show less
Review Workflow Files

Look at your workflow fn functions specifically. Non-deterministic code is only a problem in workflow functions, not in step functions.

Verification Steps

  1. Fix the code using solutions above
  2. Run the workflow: npx output workflow run <name> --input '<input>'
  3. Run again with same input: Result should be identical
  4. Check for errors: No "non-deterministic" messages

The Determinism Rule

Workflow functions must be deterministic:

  • Same input = same execution path
  • No side effects (network, filesystem, random values)
  • Only orchestration logic and step calls

Step functions can be non-deterministic:

  • Steps record their results in Temporal history
  • Replays use recorded results, not re-execution
  • All I/O should happen in steps

Debugging Tip

If unsure whether code is causing issues:

bash
# Run the workflow
npx output workflow start my-workflow --input '{"input": "test"}'

# Get the workflow ID and run debug to see replay behavior
npx output workflow debug <workflowId> --json

Look for errors or warnings about non-determinism in the trace.

  • For I/O in workflow code, see output-error-direct-io
  • For random values needed in logic, generate them in steps or pass as input

© growthxai, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in coding_assistants/claude/plugins/outputai/skills/output-error-nondeterminism of growthxai/output.

Open the folder on GitHubat commit 99ee298

Compare with similar skills

Output Error Nondeterminism next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Output Error Nondeterminism compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Output Error Nondeterminism this skillgrowthxai/output442—~1.6kAutomated safety check: NotesApache-2.0
Vercel Composition Patternssupabase/supabase111k58 repos~726Automated safety check: PassMIT
Finishing a Development Branchobra/superpowers297k5 repos~1.9kAutomated safety check: PassMIT
Typescript Advanced Typesrolling-scopes/rsschool-app10k25 repos~4.2kAutomated safety check: PassMPL-2.0
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Code Review ChecklistshareAI-lab/learn-claude-code78k4 repos~1.1kAutomated safety check: PassMIT

Similar skills

  • Official

    React composition patterns that scale. An agent skill from supabase/supabase.

    111k GitHub starsUsed in 58 repos~726 tokens
    DevelopmentAuto-check passed
  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    297k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Typescript Advanced Types

    rolling-scopes/rsschool-app

    Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications.

    10k GitHub starsUsed in 25 repos~4.2k tokens
    DevelopmentAuto-check passed
  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 4 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Greploop

    onyx-dot-app/onyx

    Iteratively improves a PR (GitHub), MR (GitLab), or shelved changelist (Perforce) until Greptile gives it a 5/5 confidence score with zero unresolved comments.

    32k GitHub starsUsed in 4 repos~3.3k tokens
    DevelopmentAuto-check passed

More from growthxai/output

All 50 skills in this repo
  • Output Build Workflow

    growthxai/output

    Implement an Output SDK workflow from a plan document. An agent skill from growthxai/output.

    442 GitHub stars~2.2k tokensUpdated yesterday
    Auto-check passed
  • Output Credentials Edit

    growthxai/output

    View, edit, and set encrypted credentials in an Output.ai project.

    442 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check: notes
  • Wire encrypted credentials to environment variables using the credential: convention.

    442 GitHub stars~930 tokensUpdated yesterday
    Auto-check: notes
  • Output Credentials Init

    growthxai/output

    Initialize encrypted credentials for an Output.ai project. An agent skill from growthxai/output.

    442 GitHub stars~803 tokensUpdated yesterday
    Auto-check: notes
  • Output Debug Workflow

    growthxai/output

    Debug Output SDK workflow issues. An agent skill from growthxai/output.

    442 GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed
  • Output Dev Agent Class

    growthxai/output

    Use the Agent class for multi-step tool loops, conversation history, streaming progress, and reusable LLM agents.

    442 GitHub stars~2.6k tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Output Error Nondeterminism

What does Output Error Nondeterminism do?

Fix non-determinism errors in Output SDK workflows. An agent skill from growthxai/output. Output Error Nondeterminism is an agent skill from growthxai/output. Fix non-determinism errors in Output SDK workflows.

When should I use Output Error Nondeterminism?

Output Error Nondeterminism fits situations like: seeing replay failures; inconsistent results between runs; non-deterministic error messages; workflows behaving differently on retry.

How do I install Output Error Nondeterminism in Claude Code?

Run `npx skills add growthxai/output --skill output-error-nondeterminism -a claude-code`. Or copy the skill folder (coding_assistants/claude/plugins/outputai/skills/output-error-nondeterminism in growthxai/output) into .claude/skills/output-error-nondeterminism in your project. Claude Code loads it when a task matches its description.

How do I install Output Error Nondeterminism in Codex?

Run `npx skills add growthxai/output --skill output-error-nondeterminism -a codex`. Or copy the skill folder (coding_assistants/claude/plugins/outputai/skills/output-error-nondeterminism in growthxai/output) into .agents/skills/output-error-nondeterminism in your project. Codex loads it when a task matches its description.

Can I use Output Error Nondeterminism in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add growthxai/output --skill output-error-nondeterminism -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/output-error-nondeterminism, .gemini/skills/output-error-nondeterminism, .github/skills/output-error-nondeterminism and .opencode/skills/output-error-nondeterminism in your project.

What does Output Error Nondeterminism need to run?

Going by SKILL.md and its folder, Output Error Nondeterminism needs the command-line tools its instructions call (npx). Our summary lists: Node.js. Its frontmatter pre-approves these tools: Bash, Read.

Does Output Error Nondeterminism access the network?

SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Output Error Nondeterminism safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Output Error Nondeterminism use?

Output Error Nondeterminism is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Output Error Nondeterminism use?

About 1.6k tokens (SKILL.md is roughly 6.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Output Error Nondeterminism?

Skills that share tags, products or a category with Output Error Nondeterminism: Vercel Composition Patterns (supabase/supabase, 111k stars), Finishing a Development Branch (obra/superpowers, 297k stars), Typescript Advanced Types (rolling-scopes/rsschool-app, 10k stars) and PR Babysitter (openinterpreter/openinterpreter, 69k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Output Error Nondeterminism?

growthxai (a GitHub organization) maintains it in growthxai/output, which has 442 GitHub stars. The repository holds 50 skills in this directory. The repository was last updated on October 9, 2026.

Source: growthxai/output on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.