SpyBara
Go Premium Account
2026
20 Mar 2026, 00:35
14 May 2026, 21:00 14 May 2026, 07:00 13 May 2026, 00:57 12 May 2026, 01:59 11 May 2026, 18:00 7 May 2026, 20:02 7 May 2026, 17:08 5 May 2026, 23:00 2 May 2026, 06:45 2 May 2026, 00:48 1 May 2026, 18:29 30 Apr 2026, 18:36 29 Apr 2026, 12:40 29 Apr 2026, 00:50 25 Apr 2026, 06:37 25 Apr 2026, 00:42 24 Apr 2026, 18:20 24 Apr 2026, 12:28 23 Apr 2026, 18:31 23 Apr 2026, 12:28 23 Apr 2026, 00:46 22 Apr 2026, 18:29 22 Apr 2026, 00:42 21 Apr 2026, 18:29 21 Apr 2026, 12:30 21 Apr 2026, 06:45 20 Apr 2026, 18:26 20 Apr 2026, 06:53 18 Apr 2026, 18:18 17 Apr 2026, 00:44 16 Apr 2026, 18:31 16 Apr 2026, 00:46 15 Apr 2026, 18:31 15 Apr 2026, 06:44 14 Apr 2026, 18:31 14 Apr 2026, 12:29 13 Apr 2026, 18:37 13 Apr 2026, 00:44 12 Apr 2026, 06:38 10 Apr 2026, 18:23 9 Apr 2026, 00:33 8 Apr 2026, 18:32 8 Apr 2026, 00:40 7 Apr 2026, 00:40 2 Apr 2026, 18:23 31 Mar 2026, 06:35 31 Mar 2026, 00:39 28 Mar 2026, 06:26 28 Mar 2026, 00:36 27 Mar 2026, 18:23 27 Mar 2026, 00:39 26 Mar 2026, 18:27 25 Mar 2026, 18:24 23 Mar 2026, 18:22 20 Mar 2026, 00:35 18 Mar 2026, 12:23 18 Mar 2026, 00:36 17 Mar 2026, 18:24 17 Mar 2026, 00:33 16 Mar 2026, 18:25 16 Mar 2026, 12:23 14 Mar 2026, 00:32 13 Mar 2026, 18:15 13 Mar 2026, 00:34 11 Mar 2026, 00:31 9 Mar 2026, 00:34 8 Mar 2026, 18:10 8 Mar 2026, 00:35 7 Mar 2026, 18:10 7 Mar 2026, 06:14 7 Mar 2026, 00:33 6 Mar 2026, 00:38 5 Mar 2026, 18:41 5 Mar 2026, 06:22 5 Mar 2026, 00:34 4 Mar 2026, 18:18 4 Mar 2026, 06:20 3 Mar 2026, 18:20 3 Mar 2026, 00:35 27 Feb 2026, 18:15 24 Feb 2026, 06:27 24 Feb 2026, 00:33 23 Feb 2026, 18:27 21 Feb 2026, 00:33 20 Feb 2026, 12:16 19 Feb 2026, 20:53 19 Feb 2026, 20:37
31 Mar 2026, 06:35
14 May 2026, 21:00 14 May 2026, 07:00 13 May 2026, 00:57 12 May 2026, 01:59 11 May 2026, 18:00 7 May 2026, 20:02 7 May 2026, 17:08 5 May 2026, 23:00 2 May 2026, 06:45 2 May 2026, 00:48 1 May 2026, 18:29 30 Apr 2026, 18:36 29 Apr 2026, 12:40 29 Apr 2026, 00:50 25 Apr 2026, 06:37 25 Apr 2026, 00:42 24 Apr 2026, 18:20 24 Apr 2026, 12:28 23 Apr 2026, 18:31 23 Apr 2026, 12:28 23 Apr 2026, 00:46 22 Apr 2026, 18:29 22 Apr 2026, 00:42 21 Apr 2026, 18:29 21 Apr 2026, 12:30 21 Apr 2026, 06:45 20 Apr 2026, 18:26 20 Apr 2026, 06:53 18 Apr 2026, 18:18 17 Apr 2026, 00:44 16 Apr 2026, 18:31 16 Apr 2026, 00:46 15 Apr 2026, 18:31 15 Apr 2026, 06:44 14 Apr 2026, 18:31 14 Apr 2026, 12:29 13 Apr 2026, 18:37 13 Apr 2026, 00:44 12 Apr 2026, 06:38 10 Apr 2026, 18:23 9 Apr 2026, 00:33 8 Apr 2026, 18:32 8 Apr 2026, 00:40 7 Apr 2026, 00:40 2 Apr 2026, 18:23 31 Mar 2026, 06:35 31 Mar 2026, 00:39 28 Mar 2026, 06:26 28 Mar 2026, 00:36 27 Mar 2026, 18:23 27 Mar 2026, 00:39 26 Mar 2026, 18:27 25 Mar 2026, 18:24 23 Mar 2026, 18:22 20 Mar 2026, 00:35 18 Mar 2026, 12:23 18 Mar 2026, 00:36 17 Mar 2026, 18:24 17 Mar 2026, 00:33 16 Mar 2026, 18:25 16 Mar 2026, 12:23 14 Mar 2026, 00:32 13 Mar 2026, 18:15 13 Mar 2026, 00:34 11 Mar 2026, 00:31 9 Mar 2026, 00:34 8 Mar 2026, 18:10 8 Mar 2026, 00:35 7 Mar 2026, 18:10 7 Mar 2026, 06:14 7 Mar 2026, 00:33 6 Mar 2026, 00:38 5 Mar 2026, 18:41 5 Mar 2026, 06:22 5 Mar 2026, 00:34 4 Mar 2026, 18:18 4 Mar 2026, 06:20 3 Mar 2026, 18:20 3 Mar 2026, 00:35 27 Feb 2026, 18:15 24 Feb 2026, 06:27 24 Feb 2026, 00:33 23 Feb 2026, 18:27 21 Feb 2026, 00:33 20 Feb 2026, 12:16 19 Feb 2026, 20:53 19 Feb 2026, 20:37
Tue 3 00:35 Tue 3 18:20 Wed 4 06:20 Wed 4 18:18 Thu 5 00:34 Thu 5 06:22 Thu 5 18:41 Fri 6 00:38 Sat 7 00:33 Sat 7 06:14 Sat 7 18:10 Sun 8 00:35 Sun 8 18:10 Mon 9 00:34 Wed 11 00:31 Fri 13 00:34 Fri 13 18:15 Sat 14 00:32 Mon 16 12:23 Mon 16 18:25 Tue 17 00:33 Tue 17 18:24 Wed 18 00:36 Wed 18 12:23 Fri 20 00:35 Mon 23 18:22 Wed 25 18:24 Thu 26 18:27 Fri 27 00:39 Fri 27 18:23 Sat 28 00:36 Sat 28 06:26 Tue 31 00:39 Tue 31 06:35
Details

1# Iterate on difficult problems | Codex use cases

2 

3[← All use cases](https://developers.openai.com/codex/use-cases)

4 

5Give Codex an evaluation system, such as scripts and reviewable artifacts, so it can keep improving a hard task until the scores are good enough.

6 

7Advanced

8 

9Long-running

10 

11Related links

12 

13[Custom instructions with AGENTS.md](https://developers.openai.com/codex/guides/agents-md) [Codex workflows](https://developers.openai.com/codex/workflows)

14 

15## Best for

16 

17- Problems where each iteration can be scored, but the best result usually takes many passes

18- Tasks with visual or subjective outputs that need both deterministic checks and an LLM-as-a-judge score

19- Long-running Codex sessions where you want progress tracked clearly instead of relying on context

20 

21## Starter prompt

22 

23I have a difficult task in this workspace and I want you to run it as an eval-driven improvement loop.

24 Before changing anything:

25 - Read `AGENTS.md`.

26 - Find the script or command that scores the current output.

27 Iteration loop:

28 - Make one focused improvement at a time.

29 - Re-run the eval command after each meaningful change.

30 - Log the scores and what changed.

31- Inspect generated artifacts directly. If the output is visual, use `view\_image`.

32 - Keep going until both the overall score and the LLM average are above 90%.

33 Constraints:

34 - Do not stop at the first acceptable result.

35- Do not revert to an earlier version unless the new result is clearly worse in scores or artifacts.

36- If the eval improves but is still below target, explain the bottleneck and continue.

37 Output:

38 - current best scores

39 - log of major iterations

40 - remaining risks or weak spots

41 

42## Introduction

43 

44Some tasks are easy to verify in one shot: the build passes, the tests go green, and you are done. But there are some optimization problems that are difficult to solve, and need many iterations with a tight evaluation loop. To know which direction to go in, Codex needs to inspect the current output, score it, decide the next change, and repeat until the result is actually good.

45 

46This type of use case pairs well with a custom UI that lets you inspect progress visually, by having Codex log the outputs and generated artifacts for each iteration.

47You can watch Codex continue working in the app while the target artifact, model output, or generated asset keeps improving.

48The key is to give Codex the necessary scripts to generate the evaluation metrics and the artifacts to inspect.

49 

50## Start with evals

51 

52Before the task begins, define how success will be measured. The best setup usually combines:

53 

54- **Deterministic checks:** things the scripts can score directly, such as constraint violations or deterministic metrics computed with code

55- **LLM-as-a-judge checks:** rubric-based scores for qualities that are harder to encode exactly, such as resemblance, readability, usefulness, or overall quality - this can rely on text or image outputs

56 

57If the subjective part matters, give Codex a script that can call a model for example using the [Responses API](https://developers.openai.com/api/reference/resources/responses/methods/create) and return structured scores. The point is not to replace deterministic checks, it's to supplement them with a consistent judge for the part humans would otherwise assess by eye.

58 

59The loop works best when the eval output is machine-readable, saved after every run, and easy to compare over time.

60 

61**Tip**: Ask Codex to generate the evaluation script for you, describing the

62 checks you want to run.

63 

64## Give Codex a stopping rule

65 

66Hard tasks often drift because the prompt says “keep improving” without saying when to stop. Make the stopping rule explicit.

67 

68A practical pattern is:

69 

701. Set a target for the overall score.

712. Set a separate target for the LLM-judge average.

723. Tell Codex to continue until both are above the threshold, not just one.

73 

74For example, if the goal is a high-quality artifact, ask Codex to keep going until both the overall score and the LLM average are above 90%. That makes the task legible: Codex can tell whether it is still below target, where the gap is, and whether the latest change helped.

75 

76## Keep a running log of the loop

77 

78Long-running work is much more reliable when Codex keeps notes about the loop instead of trying to remember everything from the thread.

79 

80That running log should record:

81 

82- the current best scores

83- what changed on the last iteration

84- what the eval said got better or worse

85- what Codex plans to try next

86 

87This is especially important when the task runs for a long time. The log becomes the handoff point for the next session and the self-evaluation record for the current one.

88 

89## Inspect the artifact, not just the logs

90 

91For some difficult tasks, the code diff and metric output are not enough. Codex should look at the artifact it produced.

92 

93If the output is visual, such as a generated image, layout, or rendered state, let Codex inspect that artifact directly, for example when the output lives on disk as an image and compare the current result to the prior best result or to the intended rubric.

94 

95This makes the loop stronger:

96 

97- the eval script reports the score

98- the artifact shows what the score missed

99- the next change is grounded in both

100 

101That combination is much more effective than changing code blindly between runs.

102 

103## Make every iteration explicit

104 

105Ask Codex to follow the same loop every time:

106 

1071. Run the evals on the current baseline.

1082. Identify the biggest failure mode from the scores and artifacts.

1093. Make one focused change that addresses that bottleneck.

1104. Re-run the evals.

1115. Log the new scores and whether the change helped.

1126. Continue until the thresholds are met.

113 

114This discipline matters. If each iteration changes too many things at once, Codex cannot tell which idea improved the score. If it skips logging, the session becomes hard to trust and hard to resume.

115 

116## Related use cases

117 

118[![](/images/codex/codex-wallpaper-1.webp)

119 

120### Understand large codebases

121 

122Use Codex to map unfamiliar codebases, explain different modules and data flow, and point...

123 

124Engineering Analysis](https://developers.openai.com/codex/use-cases/codebase-onboarding)[![](/images/codex/codex-wallpaper-1.webp)

125 

126### Create browser-based games

127 

128Use Codex to turn a game brief into first a well-defined plan, and then a real browser-based...

129 

130Engineering Code](https://developers.openai.com/codex/use-cases/browser-games)[![](/images/codex/codex-wallpaper-2.webp)

131 

132### Analyze datasets and ship reports

133 

134Use Codex to clean data, join sources, explore hypotheses, model results, and package the...

135 

136Data Analysis](https://developers.openai.com/codex/use-cases/datasets-and-reports)