tai-wei/codex-516-fix — explained in plain English
Analysis updated 2026-05-18
Drop the AGENTS.md file into a Codex project to reduce wrong answers on worst-case logic problems.
Install the rules globally so every Codex session gets stricter problem analysis.
Test whether the fix works by rerunning the original candy puzzle from the linked bug report.
Apply the rules to tasks with easy to miss conditions like touch or shape distinguishability.
| tai-wei/codex-516-fix | 619dev/guanlan | achrefelouafi/grasssystemthreejs | |
|---|---|---|---|
| Stars | 48 | 48 | 48 |
| Language | — | TypeScript | JavaScript |
| Setup difficulty | easy | moderate | easy |
| Complexity | 1/5 | 3/5 | 2/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Just copy one AGENTS.md file into a project folder or Codex's global config directory.
This is a configuration workaround, not a code project. It addresses a bug reported in an OpenAI Codex issue where the gpt-5.5 model, even set to its highest reasoning effort, sometimes skips its visible reasoning step and jumps straight to a final answer, giving a wrong result on certain logic puzzles. The bug report used a specific puzzle: reaching into a bag of candies that differ in shape, so you can tell shapes apart by touch, and figuring out the minimum number you must pull out to guarantee a matching pair. The correct answer, 21, requires noticing that shape can be told apart by touch. When Codex fails, it treats the puzzle as an ordinary blind draw instead and answers 29. Failed runs' logs consistently show a specific reasoning token count around 516, and a related issue found that Codex's reasoning token counts tend to cluster around fixed numbers such as 516, 1034, and 1552, with the 516 cluster linked to worse performance on hard tasks. This project does not patch Codex itself and does not change model routing or reasoning budgets internally. Instead it ships a single file, AGENTS.md, containing stricter problem analysis rules that you place either inside one project, to affect just that project, or in Codex's global config folder, to affect every project. Once loaded, Codex reads these rules as behavior instructions. It is meant for tasks like algorithm problems, logic puzzles, weighing and sorting problems, edge case problems, and anything needing a worst case guarantee, especially where a condition like "can be told apart by touch or sight" is easy to miss. It can also help with analyzing or restructuring written content, though it was not built for open ended creative writing. To check whether the fix is working, you can rerun the original candy puzzle. If Codex correctly uses the touch distinguishable condition, it answers 21, if it still answers 29, the fix has not taken effect for that case. The project is a single AGENTS.md file plus an Apache-2.0 license, nothing more.
A single AGENTS.md configuration file that gives OpenAI Codex stricter reasoning rules to stop it from jumping to wrong answers on tricky logic puzzles.
Use freely for any purpose, including commercial use, as long as you keep the copyright and license notice.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
double-check against the repo, no cap.