Hedgonomy detects code hallucinations via environment verification, not other AI
lovettsendit · reddit · 2026-08-31
Hedgemony proposes a method to detect code hallucinations without relying on another model or self-inspection. It focuses on the boundary moment where a probabilistic guess becomes a verifiable claim (e.g., import ghostlib).
The tool submits claims from generated code to independent authorities (interpreters or package registries) for validation:
- Invention: Introducing non-existent names.
- Misattribution: Assigning real names to wrong owners (e.g., .serialise).
- Malformation: Target exists but the call signature is invalid.
- Contradiction: Implementation disagrees with stated behavior.
Hedgemony runs code examples in a bounded subprocess to catch logical errors, turning vague "hallucinations" into reproducible technical events. It reports NOCONTRACT if code lacks a stated expected behavior.
More from coding & agent
- Hermes Agent: the free open harness that turns local LLMs into working agents — Teknium · 2026-08-31
- Teknium: Hermes + Claude Outperforms Claude Code in Benchmarks — Teknium · 2026-08-31
- Same Model, Different Harness: Coding-agent results vary by context policy — rohanpaul_ai · 2026-08-31
- Best approaches for integrating AI agents into existing products? — SellingN8 · 2026-08-31
- Request for help: Building an MCP server for a SaaS app from scratch — WriterNorth2299 · 2026-08-31
- Archify: Turn Codebases into Interactive System Maps — aigclink · 2026-08-31