Show HN: Aharness – Enforce coding-agent workflows as state machines on Codex
github.comAgents 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.
As models get better and better at following instructions, don't you think this will become lesser and lesser useful?
The better the models, the fewer guardrails they will need. However, the more you know about the process the more useful the guardrails are. Guardrails may become less useful over time, but you pay for it in uncertainty and likely token usage.
[flagged]
[flagged]
[dead]