Go fork with unions
Codex added tagged union types and an early-return bang operator to a fork of the Go compiler, then refactored the Go source to use them.
The fork used about 10% of a weekly Codex limit. The refactor removed 5k+ lines in an hour and found real bugs.
Overview
How it was set up
Codex on the $100/month plan, with a few rounds of review. Unions compile to a struct with a payload byte array, a variant field, and a GC anchor pointer.
Worth knowing
The author would not use the fork in production yet, and has not read the refactor branch closely themselves.
A prompt to start from
The source does not show the prompt.
Sources 1
History
- Source published
- 2026-10-23
- Added to Agentic Feats
- 2026-10-26
- Pick
- No
- Markdown copy
- /c/go-fork-with-unions-codex.md
More in coding
131 featsResult$28,335 spent, 9,350 commits across 145 repos, with spend up 7.4x in April after parallel git worktrees. Only 0.7% of tool calls ran overnight.
ResultOpus 5.5 recorded the repo's demo video itself using the record feature, and the author uses the tool constantly for debugging.
ResultA nightly workflow found a meteor on 25 October 2026. The bundled night detector found 95% of planes and 90% of meteors on held-out nights.