{"slug": "handling-failures-as-values-in-agent-generated-code", "title": "Handling Failures as Values in Agent-Generated Code", "summary": "High school student Jake Burwick built Vow, an MIT-licensed open source programming language designed for AI coding agents to write, which eliminates nulls and exceptions in favor of Result values that must be handled with match or the ? operator. In October 2026 tests with Claude Haiku 4.5, agent-finished code passed fresh hidden tests at 99.5% for Vow versus 99.3% for TypeScript, while on three new hard tasks Vow had one failed submission in nine runs and TypeScript had zero. Vow compiles to JavaScript, ships an MCP server exposing vow_guide, vow_check and vow_run tools, and includes a --sandbox mode that refuses programs whose declared capabilities exceed what is allowed.", "body_md": "I am Jake Burwick, a high school student, and I built Vow, an open source programming language under the MIT license designed for AI agents to write. AI coding agents such as Claude Code, Codex, and Cursor work in a continuous loop: write, run, read the error, fix.\n\nWhen agents write code in languages with null values and implicit exceptions, failure paths are easily overlooked. An unhandled exception or a missing null check causes a runtime crash later in execution. Vow has no nulls and no exceptions.\n\nIn Vow, functions that can fail return Result values. Every failure is represented directly as a value. Functions return Result values that must be handled with match or the ? operator.\n\nHere is how failure is handled in Vow:\n\n``` js\nfn parsePrice(text) {\n  let n = num(text)?\n  if n < 0 { return err(\"can't be negative\") }\n  return ok(n)\n}\n```\n\nThe ? operator unpacks the successful value or returns the error from the function. If an agent tries to ignore a failure state, it must handle the Result value before moving forward.\n\nIn tests conducted in October 2026 with Claude Haiku 4.5, code that agents finish passes fresh hidden tests at 99.5% for Vow and 99.3% for TypeScript. On three brand-new hard tasks, Vow had one failed submission in nine runs and TypeScript had zero; the two perform evenly on a small sample (measured October 2026).\n\nWhen an error occurs, Vow formats the output so an agent can fix it immediately. Every Vow error says what is wrong, where, and the likely fix. Errors are written as repair instructions an agent can act on without a human.\n\nAn error, as Vow prints it:\n\n``` php\nx TypeError: can't add a num and a str\n-> line 6, col 10\n6 | return \"Total: \" + sum\n           ^^^^^^^^^^^^^^^\nLikely fix: convert the number to text\nfirst: str(sum)\n```\n\nEvery function declares whether it can touch the network, files or environment (uses net, uses fs, uses env).\n\nThe command vow --sandbox checks capabilities before anything runs and refuses a program that reaches beyond what you allow.\n\nRefused before it runs:\n\n``` bash\n$ vow --sandbox --allow fs=./data app.vow\nx SandboxError: needs capabilities\n  the sandbox does not grant\n  env: fn leak declares 'uses env'\nNothing was run.\n```\n\nVow compiles to JavaScript. Recursive fib(32) runs in 0.09 s, against 0.14 s for Python (measured Oct 7, 2026).\n\nInstall with:\n\n```\nnpm install -g github:JakeBurwick/vow\n```\n\nFor Claude Code there is an MCP server:\n\n```\nclaude mcp add vow -- vow-mcp\n```\n\nThis gives the agent vow_guide, vow_check and vow_run tools. The site has an llms.txt and an AGENTS.md you can drop into a project so any coding agent picks up Vow. To use it, paste a one-paragraph prompt from the site into Claude Code, Codex, Cursor or any coding agent; it points the agent at the guide.\n\nThe site has a playground, a tutorial, docs, and an Errors page showing five bugs side by side in Vow, TypeScript and Python at [https://vow-lang.vercel.app](https://vow-lang.vercel.app).", "url": "https://wpnews.pro/news/handling-failures-as-values-in-agent-generated-code", "canonical_source": "https://dev.to/jakeburwick/handling-failures-as-values-in-agent-generated-code-2i6l", "published_at": "2026-11-02 17:10:21+00:00", "updated_at": "2026-11-02 17:23:54.500333+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "ai-products", "agent-protocols"], "entities": ["Jake Burwick", "Vow", "Claude Haiku 4.5", "Claude Code", "Codex", "Cursor", "TypeScript", "Python"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/handling-failures-as-values-in-agent-generated-code", "markdown": "https://wpnews.pro/news/handling-failures-as-values-in-agent-generated-code.md", "text": "https://wpnews.pro/news/handling-failures-as-values-in-agent-generated-code.txt", "jsonld": "https://wpnews.pro/news/handling-failures-as-values-in-agent-generated-code.jsonld"}}