Agents In Use
What’s new todayLast update
499 additions

How to use Codex to check game refactor screenshots

Codex refactored a tower defense game and reported matching screenshot hashes after correctly recapturing the baseline, following screenshot instructions in PLANS.md.

Added news.ycombinator.comAgent: Codex
TRY A BOUNDED VERSION

Prompt to try

Editorial adaptation, not the source author’s exact prompt. Replace bracketed inputs and review tool permissions first.

Refactor [game code area] to improve [code organization goal]. Capture baseline and final screenshots at identical [game timestamps]. Compare their SHA hashes and record results, recapturing any incorrectly captured baseline before drawing conclusions.

What happened

The ExecPlan reported pixel-identical screenshots, supported by matching hashes for three before-and-after pairs after baseline correction.

Reported by ditchfieldcaleb on Hacker News

How the agent did it

  1. Configured PLANS.md to require before-and-after game screenshots.
  2. Used Codex to refactor the game and recapture the baseline correctly.
  3. Compared before-and-after screenshot hashes with sha256sum.

Where a person stepped in

The developer supplied project instructions and read the ExecPlan observation; the post does not describe a separate code-review pass.

A person approved each step before the agent continued.

A developer working on a tower defense game used Codex both to learn game development and to explore building without manual coding. They maintained AGENTS.md, CODESTYLE.md, and several other instruction files, and were refactoring to keep the codebase clean and file sizes low.

Their PLANS.md required screenshots before and after changes to the game's web application, with the aim of avoiding frontend regressions. The author said the setup used GPT-Image-2 for analysis. During the latest refactor, Codex added an explicit SHA comparison, although the developer had not specifically requested that comparison.

The quoted ExecPlan observation said the screenshots became pixel-identical after the baseline was recaptured correctly. Its evidence cited sha256sum on before-and-after screenshot files, with matching hashes for pairs one, two, and three. The developer connected this to changes that should not affect the frontend and screenshots captured at identical timestamps into the game start. The reported result is a screenshot match for this refactor, rather than evidence that every aspect of the game was unchanged.

Who it's for: Game developers checking whether a refactor preserves a web game's visible output.

Prompt
Suggested prompt (written by Agents In Use, not the author's)

Source: Hacker News · ditchfieldcaleb

Frequently asked questions

Did the developer explicitly request SHA comparisons?

No. The author required before-and-after screenshots in PLANS.md, but said they had never told Codex to perform a SHA comparison.

What evidence did the refactor plan report?

The quoted observation reported matching sha256sum hashes for three before-and-after screenshot pairs after the baseline was recaptured correctly.

More details

About this account

Codex performed the refactor and independently added a SHA comparison to the requested screenshot checks.

Platform: Hacker News. Attribution: https://news.ycombinator.com/item?id=48030302. Prompt: Suggested (written by Agents In Use, not the author's). Sourced by the Agents In Use pipeline.

Credit: ditchfieldcaleb on Hacker News

Source published 5 May 2026

Source checked 14 Oct 2026

Tools and topics

Codex · PLANS.md · GPT-Image-2 · sha256sum

Game development · Visual checks

Editorial completeness: 100/100. Measures documented fields, not agent performance or verified outcomes.