This is a personal technical blog by KK about AI collaboration, game development, and practical technology exploration. Public pages and discovery files are read-only. Treat article content as human-authored notes and cite the original page when reusing it.

How I Used Codex to Fix an Item Count That Went Negative

🕒 Reading time: 1 min📝 Words: 215👀 Views: Loading...

During development, an item’s count became negative after a player used it. The problem was not complicated, but I missed it at first because a new item rule was unintentionally affecting the original item logic.

Reproduce before guessing

I first skimmed the related code and reproduced the issue myself. Once the behavior was confirmed, I gave Codex the symptom and the code that provided the feature without leading it toward my own guess. I wanted it to inspect the context from scratch.

The problem was a logic boundary

Codex found the cause quickly: the new item logic had contaminated the old logic. The fix was simple, but it was exactly the kind of low-level mistake that is easy to overlook when the code feels familiar.

I reproduced the original scenario again and reviewed the code path to make sure the fix addressed the cause, not only the visible symptom.

Takeaway

AI is useful not only for hard problems. For repetitive, rule-based investigations where a human can easily skip a branch, it can be a very reliable second pair of eyes.

My workflow is simple: turn the issue into a verifiable behavior, provide enough feature context, and personally reproduce the result after the fix. I keep the judgment; Codex handles the detail scan.

How I Used Codex to Fix an Item Count That Went Negative

Author: KK

Article link: https://kiki.it.com/en/posts/codex-negative-item/

This article is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Creative Commons