<metaname="description"content="codex-goal: a small wrapper that remembers one objective per project across separate codex exec runs, and injects it back in every time. Free CLI, no account.">
<divclass="kicker">upstream call: openai/codex#26966 · closed · not planned</div>
<h1class="title">don't let the agent forget <spanclass="hl">the goal.</span></h1>
<pclass="lead"><code>codex exec</code> resumes a transcript but never restates <em>why</em>. codex‑goal is a small wrapper that stores one objective per project outside Codex's own workspace, and hands it back as plain context on every new or resumed run —<spanclass="hl2">built anyway</span> after upstream closed the request.</p>
<buttonclass="cta"type="submit">Draft me →</button>
<divclass="note-row field">
<labelfor="note">note (optional)</label>
<inputid="note"type="text"name="note"placeholder="what are you running codex on?">
</div>
</form>
<divclass="thanks">✓ ON THE ROSTER — thanks, you're in.<small>We'll only email you about codex-goal. Never shared.</small></div>
<pclass="fineprint">One line on your email: used only to reach you about codex-goal, never sold, never shared. The CLI below stays free no matter what you pick.</p>
</div>
</section>
<section>
<h2class="h">the matchup</h2>
<pclass="sub">Same two commands, two sessions apart. One remembers the assignment; one doesn't.</p>
(re-injected before Codex sees anything else.)</pre>
<pclass="cap">Every new or resumed run gets the same goal text, re-stated, every time.</p>
</div>
</div>
</section>
<section>
<h2class="h">instant replay</h2>
<pclass="sub">Real, runnable output from <code>demo.py</code>— a disposable project dir, a disposable <code>$CODEX_GOAL_HOME</code>, and a deterministic stand-in for the real <code>codex</code> binary (no network, no account, nothing billed). Two separate process runs see the same goal; a <code>kill -9</code> mid-run doesn't touch it.</p>
<divclass="replay">
<divclass="crt-head"><spanclass="dot r"></span><spanclass="dot y"></span><spanclass="dot g"></span> demo.py — full output in demo.txt</div>
ASSERTION PASSED: goal text identical before and after the crash.</code></pre>
</div>
<pclass="fineprint"style="margin-top:12px">Full transcript: <ahref="demo.txt">demo.txt</a>· run it yourself: <ahref="README.md">README</a></p>
</section>
<section>
<h2class="h">how it scores</h2>
<ulclass="howitworks">
<li><spanclass="pt">01</span><spanclass="desc">Goal state lives under <code>~/.codex-goal</code>— outside the directory Codex's own sandbox lets it write to. <code>set</code> is a human command; the wrapper never calls it on Codex's behalf.</span></li>
<li><spanclass="pt">02</span><spanclass="desc">Every <code>set</code> is versioned: the previous goal moves to a capped history instead of being silently overwritten.</span></li>
<li><spanclass="pt">03</span><spanclass="desc">Writes are atomic (temp file + rename) under an exclusive file lock — a crash mid-write can't leave torn JSON.</span></li>
<li><spanclass="pt">04</span><spanclass="desc"><code>run</code> never edits the goal. It only appends one line to a separate run-log, after the child exits, with the real exit code.</span></li>
<li><spanclass="pt">05</span><spanclass="desc">Codex is spawned via an argv list, never a shell string — a goal containing <code>; rm -rf / #</code> is one opaque argument, not a command.</span></li>
<li><spanclass="pt">06</span><spanclass="desc">Ctrl‑C / SIGTERM sent to the wrapper is forwarded to the Codex child, so cancellation behaves exactly like calling <code>codex</code> directly. The wrapper's exit code is the child's.</span></li>
</ul>
</section>
<section>
<h2class="h">game passes</h2>
<pclass="sub">Free tier works offline, forever. Paid tiers are founding-price early access — there is no checkout yet.</p>
<divclass="for">teams sharing Codex objectives across a repo</div>
<ul><li>Shared goals, per-teammate run history</li><li>Slack alert when a run fails</li><li>Audit log export</li></ul>
<divclass="founding">founding price · waitlist, not billed yet</div>
</div>
</div>
</section>
<section>
<h2class="h">rules of the game</h2>
<ulclass="rules">
<li><spanclass="flag">1 goal</span><spanclass="desc">One objective per project at a time. Not a task list, not a scheduler, not a replacement for your issue tracker.</span></li>
<li><spanclass="flag">no force</span><spanclass="desc">The injected text is plain, visible user context — it carries no special authority inside Codex. A model can still choose to ignore it, same as any other instruction.</span></li>
<li><spanclass="flag">no grading</span><spanclass="desc">This only guarantees the goal is faithfully re-stated every run. It does not inspect diffs or grade progress — pair it with <ahref="https://finishline-supervisor.yolopreneur.lol/">finishline-supervisor</a> for that.</span></li>
<li><spanclass="flag">plain json</span><spanclass="desc"><code>$CODEX_GOAL_HOME</code> is ordinary local storage with your file permissions, no encryption. Don't put secrets in goal text.</span></li>
<li><spanclass="flag">local lock</span><spanclass="desc">Locking is advisory and local-filesystem only — it doesn't coordinate over NFS/SMB or across machines.</span></li>
<li><spanclass="flag">your flags</span><spanclass="desc"><code>run</code> forwards whatever <code>codex exec</code> flags you give it, including dangerous ones if you ask for them. This wrapper adds or removes none of Codex's own safety behavior.</span></li>