Back to browse
GitHub Repository

The workflow harness for Codex: typed gates, validated evidence, controlled transitions, repair paths, and inspectable logs for any workflow.

6 starsTypeScript

Aharness – Enforce coding-agent workflows as state machines on Codex

by alfredvc·Jun 23, 2026·4 points·2 comments

AI Analysis

●●SolidBig BrainNiche Gem

TypeScript FSMs enforce agent steps where prompts fail, but locks you into Codex CLI.

Strengths
  • Finite state machines prevent process drift better than prompt engineering alone.
  • TypeScript definitions allow typed evidence and validated exits instead of YAML.
  • Integrates with existing Codex setup like MCP servers and AGENTS.md.
Weaknesses
  • Tied specifically to Codex CLI, limiting adoption outside that ecosystem.
  • Early experiment status means fewer real-world workflow examples or patterns.
Category
Target Audience

Developers building autonomous Codex agents

Similar To

LangGraph · Microsoft AutoGen · CrewAI

Post Description

Agents are capable enough for long, autonomous, multi-step work now, if they have the right guardrails.. The failure mode is now process drift and context management. Prompts and skills can describe a process, but they can't enforce it.

Aharness turns the process into a runtime. You (your agent) write the workflow as a finite state machine in TypeScript: states define what Codex may do next, typed submissions prove what happened, and transitions only occur through validated exits. If a state doesn't expose an exit, the model can't take it.

The bet is that useful workflows are reusable software, not prompts copied around. FSMs are meant to be maintained, shared, and built upon. Install your favorite workflow as an npm package and build on top of it.

Aharness plugs into the Codex setup you already use: your AGENTS.md, skills, MCP servers, and permissions. The missing step between a skill and a custom agent harness. Early experiment, Apache-2.0. Feedback welcome, especially on the authoring model and composition.

What about Claude Code dynamic workflows? Both approaches attempt to solve the same problem with different hypothesis. Dynamic workflows assume that claude is capable of designing workflows that match the process you want, and they are one-offs. Aharness assumes that you want control over your workflow, to improve it over time, an build upon it.

Similar Projects

AI/ML●●Solid

Diraigent – Self-hosted orchestration for AI coding agents

Self-hosted alternative to Cursor and Continue with auditable agent playbooks.

Ship ItBold Bet
diraigent
213mo ago