Ponder
GitHubOfficialFirst committed by Quinnod345Distributed by GitHub
- Skill
- Workflow
- Agent tooling
- MIT
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
Ponder is a tool for performing repeated, structured grading passes over a subject. It uses a four-perspective deliberation loop (Skeptic, Builder, Dreamer, Empath) to refine findings, ensure exhaustive coverage, and eliminate unsupported or redundant data. The engine tracks the state of the deliberation across passes, requiring users to justify stopping based on convergence metrics rather than arbitrary completion. It is designed to prevent incomplete sweeps by enforcing unit coverage and maintaining a persistent ledger of changes.
What it does
- Executes iterative grading passes over a defined set of units.
- Applies four distinct cognitive perspectives to evaluate and refine findings.
- Enforces exhaustive coverage to ensure no units are skipped during the audit.
- Tracks churn and convergence to determine when a subject has been fully deliberated.
- Maintains a persistent session ledger to allow for resumption of interrupted tasks.
- Generates a final report detailing findings, corrections, and deliberation arguments.
When to use it
- When you need to perform a broad, multi-pass audit or grade across many units.
- When a single-pass review is insufficient to capture the depth or nuances of a subject.
- When you need to resume a previously started, incomplete auditing session.
- When you want to ensure that all units in a scope are accounted for and graded consistently.
Advantages
- Prevents silent skipping of units through enforced coverage checks.
- Reduces hallucination by requiring evidence-based deliberation from multiple perspectives.
- Provides a clear, objective signal for when a task has converged.
- Supports long-running, complex audits by allowing session resumption without data loss.
Usage examples
- “ponder the UI”
- Initializes a new pondering session for the UI, setting up the necessary directory structure and starting the first pass.
- “ponder status”
- Displays the current progress of an active session, including the current pass number and the next required phase.
- “ponder decide stop --why "The last two passes produced no new findings and all units are covered."”
- Commits the decision to end the session, recording the provided justification in the final report.
- “ponder list”
- Lists any existing pondering sessions to help the user identify whether to resume or start a new one.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/github/ponder/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip ponder.zip -d .agents/skills
Documentation by Quinnod345
Ponder
Ponder runs repeated passes over one subject until the answer stops changing: each pass revises the previous pass's findings - adding what was missed (Dreamer → add), sharpening what was vague (Builder → edit), re-grading what was mis-scored from the human user's lived and emotional perspective (Empath → change), and retracting what was unsupported or dead-code noise (Skeptic → delete). You decide how many passes to run; the engine measures whether stopping is honest and refuses to let you stop while a single enumerated unit is ungraded.
Unlike standard multi-pass prompts that force an LLM to manufacture nitpicks or hallucinate when asked to review again, Ponder treats epistemic silence as the goal of late passes: all four voices must verify the evidence and speak in deliberation.json (voices = 4), but a voice whose findings already hold emits zero deltas. Two consecutive fully reviewed, confident quiet passes earn stop (converged).
Lost the thread mid-ponder? Run
ponder status. It names the pass you are in, the phase you owe, and the literal next command. If you do not know the slug - or do not know whether a session exists at all - runponder listfirst; a.ponder/directory in the project means one probably does. Do not start over: a second session throws away the first one's ledger, which is the whole value. See Resumption before you conclude anything is missing.
The binary is ponder on PATH (~/.local/bin/ponder), ${CLAUDE_PLUGIN_ROOT}/bin/ponder (when installed as a plugin), or ~/code/ponder/bin/ponder. If command -v ponder fails and neither path exists, clone https://github.com/Quinnod345/ponder to ~/code/ponder and run ~/code/ponder/install.sh from that reviewed checkout. Every command ends with a NEXT: line naming the phase you now owe. That line is the engine driving you, and it is the thing that survives a compaction.
Every --file in this document is a path you write first. Make the scratch directories once, before the first command: mkdir -p .ponder/tmp/batch. The engine ignores directories under .ponder/ that hold no session.json, so .ponder/tmp/ is a safe place to stage input - tmp/ for what you hand the engine, tmp/batch/ for what fan-out agents write.
The terminal transcripts below are abbreviated and are there to show you the shape of a pass. Where a transcript and the engine disagree, the engine is right - read its actual output.
Deeper references, load only when you need them:
references/protocol.md- every command, every flag, every JSON shape, the verdict rules, exit codes, and how reconciliation andverify --repairwork.references/perspectives.md- Skeptic / Builder / Dreamer / Empath as runnable prompts, and how to fan them out.references/harness-notes.md- what differs between Claude Code and Codex: subagents, sandboxing, psql, install. Also the session lock, in full, if you are about to fan work out.
Read the lens pack for your subject (lenses/<lens>.md in the ponder repo) before pass 1. It defines what a unit is, how to enumerate exhaustively, the dimensions, and what each rung of the 1-5 scale means.
The loop
Once, at the start
First check that you are actually at the start. If a pondering of this subject is already open, start is the wrong command and a second session throws away the first one's ledger.
ponder list # is one already open? if yes, go to Resumption
ponder doctor # environment + whether the OCA bridge is reachable
ponder start "the UI" --lens ui --max-passes 6 --min-passes 2start prints Prior pondering if the OCA remembers thinking about this subject before - read it, it is where you left off last time. The OCA is optional; an unreachable one degrades silently and never blocks a pass.
Every pass, in this order
predict - before you look at anything.
ponder predict --churn 0.35 --claim "Pass 1 over-graded empty states and never opened the error paths."You are stating what this pass will do to the finding set. The engine scores it assurprise = |predicted - actual|. Guessing low every time to look calibrated corrupts the only signal that tells you whether you understand the subject yet.--churnis validated to 0-1 - anything outside that is refused, not clamped:ponder predict --churn 1.2exits1and records nothing.0and1.0are both legal. On pass 1 the number is recorded but not scored - there is no previous pass, so the engine reports no churn to take the distance from. Write the honest guess and put the real content in--claim. The signal starts at pass 2.survey (pass 1 only) - enumerate every unit exhaustively, using the lens pack's enumeration recipe, or let the CLI walk disk/git directly with
--scan <dir>.ponder units --file .ponder/tmp/units.json --scan src/routes --strict-scope(orponder units --scan src/routesto auto-seed every file in<dir>) When--scan <dir> --strict-scopeis passed alongside--file, the engine cross-checks everyunit.pathagainst the actual files on disk under<dir>and exits2if any file was omitted. Later passes amend the inventory with deltas instead:unit-addfor what the survey missed,unit-editfor what it got wrong,unit-deletefor what is out of scope.appraise - grade every unit against the lens rubric. Pass 1:
ponder grade --file .ponder/tmp/findings.jsonPass 2+: re-read the units and the current findings. The output is deltas, filed at step 5 - on later passes you appraise by revising, so there is no separate command.deliberate - put the current finding set to the four perspectives (
references/perspectives.md).ponder deliberate --file .ponder/tmp/deliberation-2.jsonThis is where the through-line gets written, not just where deltas get produced. The findings are per-unit by construction; the argument is the only place in the loop where anything is said about the set as a whole. On the 228-screen run the single most valuable output was not one of the 760 findings - it was the Dreamer's cross-screen claim, which no individual grade could have carried. Write eachargumentas a paragraph that would be worth reading on its own, name the pattern across units, and let the deltas fall out of it. An argument written as a list of delta stubs has already thrown away the part that mattered. Skipping is legal and recorded against you:ponder deliberate --skip --why "..."marks the pass skipped inpasses/NN/deliberation.json, surfaces the reason inreport.md, and - when the OCA is reachable - raises adeliberation_skippedmetacognitive observation. The record survives with the OCA off; only the observation does not.revise - apply the deltas the deliberation produced.
ponder delta --file .ponder/tmp/deltas-2.jsonlEvery delta carriesop,perspective, and a non-emptywhy. The engine rejects a delta without awhy. On pass 2+ this call satisfies appraise as well. Token-efficient internal notation: To keep multi-pass token usage low (~56% reduction across 4 passes), you may write internal machine-to-machinedeliberation.jsonarguments anddeltas.jsonlwhystrings using compact causal arrows ("safe-query.js:5 binds $1 -> SQLi claim false -> retract"), while keeping all user-facing findingtitle,detail, andrecommendationfields in clear, complete prose.judge -
ponder judgecomputes the metrics and prints advice.decide -
ponder decide <continue|stop|escalate> --why "..."commits your call.
On pass 2+ the engine skips survey and collapses appraise into the ponder delta call, so the command sequence is predict → deliberate → delta → judge → decide. Phase order is enforced: a command that arrives out of order exits 2 and names the phase you owe. Believe that message over your memory. And if at any point in this list you are not certain which pass you are in or what you already did, stop guessing and run ponder status - it is cheap, it takes no lock, and it answers both (Resumption).
voices counts the perspectives that spoke in the deliberation - a non-empty argument in passes/NN/deliberation.json. A Skeptic who opened the evidence, found the finding sound and said so has voted; finding nothing is a result, and a voice should not have to manufacture a delta to be counted. A pass that skipped deliberation heard nobody and reports voices 0. Watch the delta ops separately: a pass whose deltas are all add accumulated rather than argued, whatever its voices says.
How many passes
ponder judge advises. ponder decide commits. The advice is computed from coverage, novelty, churn, thrash, surprise, stall, confidence floor and voices (formulas and the ordered verdict rules are in references/protocol.md). It cannot see what you know, so it can be overridden - with one exception below.
Write the --why before you choose. Whichever way you are leaning, draft the sentence you would put in ponder decide and read it as the user will read it in report.md in a month. "Two quiet passes, full coverage, every open must above 0.5 confidence" is a stop. "Nothing new came up" is not - it is the sentence you write when you are tired. If you cannot write a --why that survives being read back, you have your answer: run another pass.
Default to the advice. You may override it in either direction, and both directions cost the same thing: a --why of at least 12 characters, written permanently into report.md under Overrides. Overriding a stop into another pass is the cheap mistake - one more pass. Overriding a continue into a stop is the expensive one, and the bar for it is the whole honest-stop checklist below, every item, not a feeling that you are done. The two checklists below are where the decision actually gets made - the engine's rules got you a default, and you are the only one in the loop who can see whether it is right.
Override toward another pass when any of these is true:
The last pass changed your mind about something important. If pass N killed a finding you would have shipped, moved a severity, or opened a dimension nobody had looked at, then pass N+1 has somewhere real to go. Late novelty is not noise - it is evidence the subject is deeper than your inventory.
A whole class of unit was graded shallowly. One finding on a screen no earlier pass had seen is a first look, not a grade. Same for "all six modals got one line each". Coverage counts units, not depth; it cannot see this and you can.
The deliberation barely happened.
voices < 3- fewer than three perspectives argued at all - or four spoke and the deltas still came back all one op. Run another pass and put the Skeptic and the Empath on it specifically; the missing voices are usually the ones that would have cut findings, not added them.Your prediction was badly wrong toward more churn (
surprise > 0.3with actual above predicted). You do not model the subject yet, so you cannot claim it has settled.
Stopping is honest when all of these hold:
coverageis 1.0 (the engine enforces this; see below).The last two passes produced no
addyou would defend as new ground.churnis near zero, and what did move was ranking, not substance.Every open
mustfinding hasconfidence >= 0.5- that isconfidenceFloor 0.00on the judge table, not merely under the 0.2 the engine enforces. You are about to recommend work; amustyou cannot defend is a guess you are asking someone to act on. If the floor is not zero, either go and get the evidence (achangeraising the confidence) or drop the severity.The last pass you would call substantive heard at least three voices.
ponder decide stopwarns below three and lets you through; if you go through, say why in the--why.Every unit you dropped from the inventory, you dropped for a reason you would say out loud to the person who asked for the pondering. See the phantom rule below.
Stopping is not honest because you are bored, because the context got long (that is what ponder status and a fresh subagent are for), because the remaining findings are tedious to write up, or because you hit maxPasses while the numbers were still moving. That last one is a budget stop - the engine reports it as budget, never as convergence, and so should you.
A converging pass is supposed to feel quiet, and a pass that emits nothing is a real result. The last pass of the 228-screen run produced zero deltas from all four voices - every perspective read the set, found nothing it would change, and said so - and that was the correct, honest outcome, not a wasted pass. It is the strongest evidence of convergence the loop can produce: four voices looking for work and finding none. Expect the pass count to feel anticlimactic near the end, and do not manufacture a delta to prove you were there. The mechanics allow it: ponder delta takes an empty file, applies nothing, prints 0 deltas applied and delta voices 0/4 - no perspective emitted a delta, and advances the phase like any other pass. A voices 4/4 with delta voices 0/4 and a deliberation whose arguments each say concretely what was re-checked and why it held is a converged pass. The same row with four arguments saying "looks fine" is three voices going through the motions, and only you can tell which one you just ran.
blocked cannot be overridden. When coverage < 1.0 the verdict is blocked, it names every ungraded unit, and ponder decide stop exits non-zero. Every other verdict is a judgement call about diminishing returns; this one is a fact about work not done, and it is the exact failure ponder exists to prevent - a sweep that grades 11 of 12 screens and reports as though it graded 12. There is exactly one move that always works: go and grade the missing units (ponder delta with adds). There is a second move, narrow and checked by the engine, for a unit that does not exist at all - the phantom rule below.
Do not go looking for a way around it. ponder decide recomputes coverage from units.json and findings.json at the moment you decide, so a stale metrics.json, a hand-edited verdict.json, a lowered --min-passes, --json mode and a second session all leave the gate exactly where it was. Verified: every one of those still exits 2, --json included - it just returns the refusal as {"ok": false, "code": 2} instead of printing it.
escalate means the loop is oscillating (thrash > 0.25 - passes reversing each other on the same targets). Another identical pass will not help. Rotate which perspectives lead, widen the evidence you are reading, or split the subject into two sessions and ponder each. Commit it with ponder decide escalate --why "..." and then actually do something different.
Budget shape: --min-passes 2 because a single pass is an opinion, not a pondering; --max-passes 6 for a broad sweep, 3-4 for a narrow subject.
Correcting a unit - the caption has to follow the finding
A unit's label is a caption on the inventory, and a pass that corrects the finding underneath it has to correct the caption too. Pass 1 enumerates a screen as "Marketing footer - both links 404". Pass 3 opens the file, finds /privacy-policy resolves fine, and rewrites the finding to say so. If the caption cannot move, report.md now leads with a headline that contradicts the finding printed directly beneath it. The real 228-screen run shipped exactly that, because there was no way to fix it. There is now.
{"op":"unit-edit","target":"screen.marketing.footer","perspective":"builder","why":"Pass 1's label said both links 404; the finding under it now says the opposite, and says it correctly.","set":{"label":"Marketing footer - /privacy-policy resolves","meta":{"route":"/"}}}It sets
label,path,kind,meta- and nothing else. Anything else is refused by name.It can never set
id. The id is the join key betweenunits.jsonandfindings.json; moving it would orphan every finding on that unit. The engine refuses and says so. If the id itself is wrong,unit-deleteandunit-addthe corrected unit, and pay what that costs coverage.metamerges key by key. Correcting a route leaves thestatemarker sitting beside it alone. Every other field replaces.Coverage does not move. That is the point. Correcting a caption by deleting the unit and re-adding it would drop coverage below 1.0 and block the stop - a wrong caption would reopen the session.
unit-editcostschurninstead, which is honest: something did move.It is a revision, so it thrashes like one. A label changed in pass 2 and put back in pass 3 registers as a reversal.
It is on the record. Every
unit-editappears inreport.mdunder Corrected screens - or whatever your lens calls a unit - with its pass, its voice, the new values and yourwhy. And a label edited by hand inunits.jsonwith no ledger record behind it is a divergence:judge,decide,reportandapplyall refuse the session until it reconciles. Correcting a caption on the record is one delta. Correcting one off the record is not available.
Use it when the pass genuinely learned something about the unit. Do not use it to tidy wording you simply prefer - that is churn you will have to defend at decide.
The phantom rule - deleting a unit you never looked at
unit-delete is the only op that shortens the ungraded list, so it is the one the engine watches hardest. What it costs coverage depends on whether you ever looked:
The unit carries a finding (even a retracted one - withdrawing a judgment does not un-see the thing). Deleting it is an honest scope change. It leaves the inventory and the coverage denominator.
The unit was never graded. It leaves the inventory and stays in the coverage denominator, still counted, still ungraded, gate still shut. Nothing errors. Coverage simply does not move, and if you were deleting it to make the number go up, it did not work.
The unit was never graded and the delta carries
"phantom": true. Now the denominator drops - after the engine has checked you. It resolves every path the unit has ever carried from the project root: any of them exists → the whole batch is rejected (Something you can open is not something pass 1 imagined); all of them missing and the path never moved → accepted and recorded for ever asverified-missing; the path was edited, or there was never one → accepted and recorded for ever asunverified. Every accepted phantom is named permanently inreport.mdunder Phantom units, with yourwhyquoted underneath it.
{"op":"unit-delete","target":"screen.legacy.print","perspective":"skeptic","why":"Opened src/routes/legacy/print.tsx - the file is gone; the route was removed in #1841 and pass 1 enumerated it off a stale router snapshot.","phantom":true}Now the part that matters. phantom is a claim that a route does not exist - that pass 1's survey enumerated something the software does not have. It is not a claim that you ran out of context, or time, or patience.
If you did not look at a screen, do not delete it from the list. Go look at it. That is the whole job. The engine can catch you only when the unit has a path to check; a unit with no path is accepted on your word alone, and the record will say unverified next to your why for as long as the session exists. Writing "phantom": true about a route you simply never opened is lying to a file that keeps it - and it is precisely the half-delivered sweep ponder was built to make impossible, done by hand.
Before you write phantom, answer one question: what did I open, and what was not there? If the answer names a path and an absence, put it in the why and file the delta. If the answer is "nothing, I just didn't get to it", you have a unit to grade, not a phantom to declare.
And the path is not a way around that. unit-edit can move a unit's path. Two deltas - point the unit at a filename that does not exist, then claim it never existed - would have the engine certify the absence of a screen that is sitting right there in the repo. That is the same dishonesty as the last paragraph wearing a new op, and the engine closes it: a phantom claim is checked against every path the unit has ever carried - the one its unit-seed or unit-add gave it, every value any unit-edit has set since, the one units.json holds now, and any set earlier in the same batch. One survivor sinks the whole batch, and the refusal names the path it found and the pass that set it:
delta line 3: unit "screen.auth.sso" is claimed phantom, but a path it has carried exists:
/abs/src/routes/auth/sso.tsx (carried by the unit-add that created it in pass 4). Something you
can open is not something pass 1 imagined. A phantom claim is checked against every path the unit
has ever had, so editing the path first does not clear it.Editing a path never strengthens a phantom claim either. If the path moved and no version of it exists, the claim is accepted but permanently recorded unverified - never verified-missing - and report.md says which paths were checked. Every version was missing, and the engine still will not certify it, because "missing" and "never existed" are only the same claim when the target stayed still. So a moved path buys you exactly nothing and leaves a permanent note that the unit moved before it vanished.
If the path in the inventory is genuinely wrong, correct it with a unit-edit and go grade the screen. That is what the op is for. It is not a step on the way to deleting the screen.
And one refusal that is not about you at all. Every path is resolved from the session's project root, so the check is only as good as that root. If the root was guessed - no --project, and no .git / package.json / other project marker anywhere above the directory you started in, so the engine adopted a stray .ponder or fell back to the working directory - then a path that fails to resolve tells you nothing, and the claim is refused:
delta line 2: unit "screen.settings.profile" is claimed phantom and none of the 2 paths it has
carried (src/routes/settings/profile.tsx, src/routes/settings/profile-v2.tsx) resolves under
/private/tmp - but that project root was guessed, not established (no project marker anywhere
above the working directory; adopted an ancestor .ponder). A file that is missing from the wrong
directory is not a screen that never existed.This is the engine refusing to certify its own guess. ponder start and ponder status print the project root and what decided it, so check that line first: if it says the root was adopted or fallen back to, and it is not where the software actually lives, start the session again with --project <path> and the claim will be checked properly. A unit that never had a path is unaffected - there was nothing for a root to resolve, and it is still accepted as unverified on your word.
The honest exits when you genuinely cannot finish are ponder decide continue (do the work next pass) and ponder abort --why "..." (say what stopped you). Both leave a record that reads true later. A false phantom does not.
Fanning out over many units
A sweep of 40 screens does not fit in one context and should not try to. Batch the grading; keep the session single-threaded.
Batching rule: 8-12 units per agent. Fewer wastes a context; more and the last units in the batch get a thinner read than the first - exactly the shallow-grade failure you would then have to spend a pass fixing.
Non-negotiables for fan-out:
Only the parent runs
ponder. Batch agents grade and return text. The engine does hold an exclusive lock on the session, so a race cannot corrupt it - but a race has a loser, and the loser's work is refused, not merged. Two concurrentponder deltacalls: one applies its batch and advances the phase; the other waits for the lock, reloads the session, finds it now owesjudge, and exits2with nothing applied. A subagent that does not check its exit code will report success while its entire batch went nowhere. Collect JSONL from the batch agents, concatenate, and make one call yourself. (references/harness-notes.mdhas the lock's full behaviour - the wait, the stale reclaim, what the loser sees.)Give each agent the rubric, its own units, and the output shape - the lens pack text, its unit list with paths, the dimensions, the 1-5 scale. Do not give it the whole finding set on pass 1; you want independent grades, not consensus.
On revision passes, hand each agent only the current findings for its own units, and ask for deltas, not a re-grade. Ask for a re-grade and you get thirty
adds that duplicate what is already there, which the Skeptic then has to kill, which the thrash detector then flags.Ask for JSONL, one object per line, and nothing else - no prose, no fences. A truncated line is droppable; a truncated JSON array is garbage. Concatenation is then
cat.
In Claude Code: use the Agent tool, one agent per batch, all launched in a single message so they run in parallel. Each agent writes its lines to .ponder/tmp/batch/findings-<n>.jsonl and returns only the path plus a count. For a very large sweep (60+ units, or one where batches need retrying), the Workflow tool handles batching and result collection better than hand-rolled parallel agents.
In Codex: there is no in-process subagent. Either spawn codex exec subprocesses, one per batch -
codex exec -C "$PWD" --sandbox workspace-write --skip-git-repo-check \
-o .ponder/tmp/batch/batch-3.txt \
"Grade these 10 screens against ~/code/ponder/lenses/ui.md. Units: ... .
Write one JSON finding object per line to .ponder/tmp/batch/findings-3.jsonl. Output nothing else." \
</dev/null &backgrounded with
&and collected withwait; or run batches sequentially in one context, writing each batch's JSONL to disk and dropping the detail before starting the next. Sequential is slower but has no subprocess or sandbox surprises, and the disk is your memory either way.codex execstarts a fresh session and inherits none of your context, so everything it needs goes in the prompt or in a file it can read.
Neither of the two extra tokens on that command line is decoration. Without --skip-git-repo-check the child exits 1 before it does any work - Not inside a trusted directory and --skip-git-repo-check was not specified - so a ponder of anything that is not a git checkout loses every batch at once. And codex exec reads stdin even when the prompt is an argument; backgrounded with & it inherits the parent's stdin, so </dev/null is what stops a batch blocking on a pipe nobody is going to close.
Then, in either harness, concatenate once and hand the engine a single file. ponder grade takes JSON, not JSONL, so the batch lines need wrapping:
cat .ponder/tmp/batch/findings-*.jsonl > .ponder/tmp/all.jsonl
node -e 'let s="";process.stdin.setEncoding("utf8");process.stdin.on("data",d=>s+=d).on("end",()=>{const findings=s.split("\n").filter(Boolean).map((l)=>JSON.parse(l));process.stdout.write(JSON.stringify({version:1,findings},null,2)+"\n")})' \
< .ponder/tmp/all.jsonl > .ponder/tmp/findings.json
ponder grade --file .ponder/tmp/findings.jsonsetEncoding("utf8") is not decoration. Without it the chunks arrive as buffers and each one is stringified on its own, so a multi-byte character that straddles a 64 KB read boundary is coerced to replacement characters. Reproduced deterministically: 65,535 ASCII bytes followed by 数 turns that one character into three U+FFFD without it, and survives intact with it. Whether it bites at all depends on where your curly quotes and accents happen to fall, which is the worst property a corruption can have - it ships a mangled title with a clean exit code and no warning, and the run that finds it is not the run that has the bug.
Stage batch files in their own directory (.ponder/tmp/batch/) and never let the concat glob match its own output. cat .ponder/tmp/deltas-*.jsonl > .ponder/tmp/deltas-2.jsonl works exactly once: on the re-run you are told to do when a batch dies, the glob now matches deltas-2.jsonl, the shell truncates it before cat opens it, and cat ends up reading the file it is writing.
What happens next depends on sort order, which is the part that makes this hard to believe until it bills you. Measured: with deltas-1.jsonl sorting before the target, cat copies batch 1 in, then opens deltas-2.jsonl and finds that same content waiting for it - a loop that fills the disk (capped at 20 MB with ulimit -f in the test, still climbing when it hit the cap). With the target sorting first, there is no loop at all: it reads an empty file and you get a quietly incomplete batch instead. So the failure is either a full disk or silent data loss depending on what you named the files, and "I tried it once and it was fine" proves nothing. Deltas need no wrapping, so:
cat .ponder/tmp/batch/deltas-2-*.jsonl > .ponder/tmp/deltas-2.jsonl # pattern cannot match the target
ponder delta --file .ponder/tmp/deltas-2.jsonlDeliberation does not fan out by unit. It fans out by perspective - four agents, one per voice, same finding set, each emitting only its own delta op. See references/perspectives.md.
Resumption
If you have lost context, do not guess and do not start over. Run ponder status.
ponder statusponder status - ui-2026-08-24
session ui-2026-08-24 open
subject the UI
lens ui - unit = screen, 12 dimensions
grade on information-hierarchy, empty-states, loading-states, error-states, motion,
affordance-clarity, density, responsive-behaviour, accessibility,
copy-tone, consistency, delight
pass 3 of 6 (min 2)
owes deliberate
coverage 0.92 - 11 of 12 screens graded
findings 29 total · 26 open · 0 resolved · 0 deferred · 3 retracted
prediction churn 0.12 - "The invite route is small; one or two findings there and no…"
signals p2 novelty 0.12 churn 0.42 thrash 0.00 surprise 0.02 stall 0 conf-floor 0.11 voices 4/4
last verdict pass 2: blocked → decided continue - "Dreamer found /invite/:token. Cannot stop with a screen…"
oca reachable - postgres://localhost/oneiro
store /abs/path/.ponder/ui-2026-08-24
1 ungraded screen - stop is refused until this list is empty:
screen.invite.accept
History
pass advice decision reason
1 continue continue Pass 1 is the inventory plus a first opinion. Nothi…
2 blocked continue Dreamer found /invite/:token. Cannot stop with a sc…
NEXT: deliberate - ponder deliberate --file deliberation.json --session ui-2026-08-24 # or: ponder deliberate --skip --why "<reason>"Act on the owes row and the NEXT: line. NEXT: is the literal command, already carrying --session; paste it. Everything else you need to resume is in the same block: which pass, what is still ungraded, what the last pass decided and why, and where the files are. The signals row is labelled with the pass it came from - signals p2 while you are working pass 3, because the current pass has not been judged yet.
Getting back to work in five commands
Do these in order. Do not substitute recall for any of them.
ponder status # 1. the pass, the phase you owe, the ungraded list
ponder verify # 2. do the files still agree with the ledger?
cat .ponder/<slug>/findings.json # 3. the current truth - every live finding, with ids
cat .ponder/<slug>/ledger.jsonl # 4. how it got there: every delta, every why, in order
ponder report # 5. optional, when you want it readable rather than rawThen run whatever NEXT: printed.
ponder verify is the command for a session you did not personally leave in a known state - one you inherited, one another agent was driving, or one whose last command was interrupted. It replays ledger.jsonl from line 1, derives what units.json and findings.json must contain, and compares - then compares the ledger against the per-pass deltas.jsonl files, which are the same records written a second time. Exit 0 and a summary means the session is sound. Exit 2 names every id and field that disagrees, and judge, decide, report and apply will refuse the session on the same grounds, so it is better to find out now than at the verdict.
Every command writes ledger.jsonl before it writes the state files, so the only thing an interrupted command can leave behind is a ledger that is ahead of its own view - and that is repairable. ponder verify --repair replays the ledger, rewrites the state files to what those records must have produced, appends the missing tail to any pass's deltas.jsonl, and prints line by line what it rebuilt. It refuses, exit 2, when a state file holds a unit or a finding no ledger record ever created: that data exists in exactly one place, so nothing can rebuild it, and it is either a forgery or an unrecoverable loss. Do not go looking for a flag past that refusal - there isn't one, and --repair never invents state. Without --repair, verify writes nothing at all, so running it is free.
Steps 3 and 4 are not optional reading for a mid-loop pass. You cannot deliberate over a finding set you have not re-read, and you cannot avoid re-adding what the Skeptic killed two passes ago without the ledger in front of you - that is what thrash measures and what an escalate you caused yourself looks like. For a big set, read the findings for the units this pass is about, plus every ledger line touching them.
Everything else you might need:
ponder status --jsonfor the same thing machine-readable, including the ungraded unit list.ponder listshows every session it can see from here - both stores, this project's.ponder/and the~/.ponder/fallback - with each one's status, pass, phase and coverage. It is how you find a slug you have forgotten. Every other command then takes--session <slug>to target one. Never start a new session because you lost the thread - you would throw away the ledger, which is the whole value.Nothing in
findings.jsonorledger.jsonlis ever erased. A retraction is a state, so pass 2's reasoning is still legible in pass 6 and a later pass can reverse an earlier pass's kill.ponder doctorreconciles every session it can see and names any that fail under Problems, with theponder verify --session <slug>that diagnoses each one. That is how a machine full of sessions tells you which one is damaged.Never hand-edit
units.jsonorfindings.jsonto fix something. The ledger is the authority and every decision-point command recomputes against it, so a hand-edit does not correct the session - it breaks it, and you will meet the refusal atjudge. Everything you might want to fix that way has a delta:edit,change,delete,unit-add,unit-edit,unit-delete.Re-running a phase you already satisfied exits
2and names the phase you actually owe. That is not an error to work around; it is the state machine correcting your memory.If the subject genuinely changed under you,
ponder abort --why "..."and start a clean session. Silently re-scoping an open session poisons its metrics.
If you were the parent of fan-out agents and one died, re-run that batch only. The state lives in files, not in anybody's context.
A compaction is not a reason to stop. It is the failure mode the whole design is built around: the files hold the pondering, ponder status hands it back, and the loop continues from exactly where it was. Deciding stop because your context got long is the dishonest stop wearing a technical excuse - and if coverage is short, the engine will refuse it anyway.
Worked example - pondering a UI
Twelve screens, four passes, one of them blocked. Abbreviated throughout.
Pass 1 - seed.
mkdir -p .ponder/tmp/batch
ponder start "the UI" --lens ui --max-passes 6 --min-passes 2
ponder predict --churn 0.9 --claim "Pass 1 is seeding. I expect the empty and error states to be the weak dimensions and the dashboard to grade well."On pass 1 the number is recorded and not scored - there is no previous pass to have churned against - so the --claim is the part that will be worth reading in pass 2. Both go into passes/01/predict.json and into report.md.
Enumerate per the lens - a unit is one thing a person can be looking at, so a route with a distinct empty, loading or failed state is more than one unit. Eleven units across seven routes (remember that number):
{ "version": 1, "lens": "ui", "units": [
{ "id": "screen.dashboard", "label": "Dashboard - populated", "path": "src/routes/dashboard.tsx",
"kind": "screen", "meta": { "route": "/" } },
{ "id": "screen.settings.billing.empty", "label": "Settings → Billing - no invoices",
"path": "src/routes/settings/billing.tsx",
"kind": "screen", "meta": { "route": "/settings/billing", "state": "empty" } }
] }ponder units --file .ponder/tmp/units.json # 11 units
ponder grade --file .ponder/tmp/findings.json # 24 findings → f-0001..f-0024
ponder deliberate --file .ponder/tmp/deliberation-1.json
ponder delta --file .ponder/tmp/deltas-1.jsonl # 8 deltas: 2 add, 3 edit, 2 change, 1 delete
ponder judge
ponder decide continue --why "Pass 1 is the inventory plus a first opinion. Nothing has been argued with yet."On pass 1, four of the eight signals (novelty, churn, thrash, surprise) print as - because there is no previous pass to measure change against; coverage (1.00), confidenceFloor (0.14), stall (0) and voices (4/4) describe the current state. Rule 2 advises continue regardless because a single pass is an opinion, not a pondering.
Pass 2 - the revision pass. This is where the value is.
ponder predict --churn 0.4 --claim "Pass 1 over-graded card polish and never opened the error paths. Expect deletes on the dashboard and new findings on 500/timeout."
ponder deliberate --file .ponder/tmp/deliberation-2.json{ "question": "Does the pass-1 finding set survive a second reading of the code?",
"skeptic": { "argument": "Two findings are unsupported. f-0011 claims inconsistent card padding; both cards resolve to --space-4. f-0019 is f-0004 on a different screen - same root cause, counted twice.", "confidence": 0.85 },
"builder": { "argument": "Half the recommendations name a problem instead of a change. 'Improve hierarchy' is not a next step.", "confidence": 0.7 },
"dreamer": { "argument": "Nobody has asked what any screen does when the API 500s. Every finding so far assumes the happy path. Also: /invite/:token exists and is not in the inventory.", "confidence": 0.75 },
"empath": { "argument": "The billing empty state blocks a first-run user; it outranks three polish findings currently scored above it.", "confidence": 0.7 } }The deltas - two of pass 1's findings deleted, three added, plus the missed route (note that unit-add must sit above any add, unit-edit, or unit-delete targeting that new unit because deltas apply in file order):
{"op":"delete","target":"f-0011","perspective":"skeptic","why":"Claimed inconsistent card padding; both cards resolve to --space-4. Unsupported."}
{"op":"delete","target":"f-0019","perspective":"skeptic","why":"Duplicate of f-0004 - same root cause on a different screen."}
{"op":"unit-add","perspective":"dreamer","why":"Route exists and was missed in the pass 1 survey. One unit, not four: the loader validates the token server-side and an invalid or spent token 404s at the router, so there is only ever one render state.","unit":{"id":"screen.invite.accept","label":"Accept invite","path":"src/routes/invite/accept.tsx","kind":"screen","meta":{"route":"/invite/:token"}}}
{"op":"add","perspective":"dreamer","why":"No pass had asked what any screen does when the API 500s.","finding":{"unit":"screen.projects.detail","title":"No error state - a failed load renders an empty shell","detail":"The query error branch returns null, so a 500 is indistinguishable from 'no projects'.","dimension":"error-states","score":1,"severity":"must","confidence":0.85,"effort":"m","evidence":["src/routes/projects/[id].tsx:41-60"],"recommendation":"Render a failure state with the cause and a retry that refetches."}}
{"op":"edit","target":"f-0007","perspective":"builder","why":"Recommendation named the problem, not the change.","set":{"recommendation":"Add an empty state with cause, expectation and a 'Add payment method' primary action."}}
{"op":"change","target":"f-0009","perspective":"empath","why":"Blocks first-run; outranks polish.","set":{"severity":"must","score":2}}ponder delta --file .ponder/tmp/deltas-2.jsonl # 11 deltas: 3 add, 3 edit, 2 change, 2 delete, 1 unit-add
ponder judgeponder judge - pass 2 of 6
signal value reads as
coverage 0.92 11 of 12 screens graded
novelty 0.12 revising adds ÷ live findings
churn 0.42 revising deltas ÷ live findings
thrash 0.00 0 reversing deltas
surprise 0.02 predicted 0.40, got 0.42
stall 0 consecutive passes under 0.02 churn
confidenceFloor 0.11 open must-findings still guessing
voices 4/4 builder, dreamer, empath, skeptic
delta voices 4/4 builder, dreamer, empath, skeptic
advice: blocked - 1 of 12 screen has never been graded. Stopping is not permitted.
1 ungraded screen - "ponder decide stop" will be refused:
screen.invite.accept
NEXT: decide - ponder decide continue --why "<reason>" --session ui-2026-08-24 # blocked: 1 ungraded screen - stop is refused until coverage is 1.0The Dreamer found a route at deliberation time, after appraise had closed. Coverage dropped to 11/12 and the verdict is blocked - no override exists. Note thrash stayed at 0.00 even though the Skeptic killed two pass-1 findings: pass-1 seeding is not a deliberative add, so deleting its noise reads as the Skeptic working, not as the loop reversing itself.
ponder decide continue --why "Dreamer found /invite/:token. Cannot stop with a screen nobody has graded."Pass 3 - close the gap, and correct the caption pass 2 put on it.
ponder predict --churn 0.12 --claim "The invite route is small; one or two findings there and nothing new elsewhere."
ponder deliberate --file .ponder/tmp/deliberation-3.jsonGrading the invite route turns up the screen nobody had described. Pass 2's Dreamer named it "Accept invite" off the router; opening the file, accept is one of two buttons, and the Dreamer's add lands on the decline button beside it. The Builder updates the unit caption with unit-edit so report.md does not contradict the finding beneath it:
{"op":"unit-edit","target":"screen.invite.accept","perspective":"builder","why":"Pass 2 named this screen off the router and called it \"Accept invite\". The finding filed against it this pass is about the decline button beside accept, so the caption now contradicts the finding printed under it.","set":{"label":"Accept or decline invite"}}ponder delta --file .ponder/tmp/deltas-3.jsonl # 2 deltas: 1 add, 1 unit-edit
ponder judge
ponder decide continue --why "The invite route earned one finding on a thin pass. I don't trust a one-look grade on a screen no earlier pass had seen."ponder judge on pass 3 reports coverage 1.00 (12/12), novelty 0.04, churn 0.07, voices 4/4 and delta voices 2/4 (the Skeptic and Empath verified the set and found nothing to change). Because convergence requires two consecutive quiet passes and pass 2 churned 0.42, the engine advises continue.
Pass 4 - confirm.
ponder predict --churn 0.05 --claim "The invite route holds up on a hard second read. At most a ranking change."
ponder deliberate --file .ponder/tmp/deliberation-4.json # targeted re-check by builder and empath
ponder delta --file .ponder/tmp/deltas-4.jsonl # 2 deltas: 1 edit, 1 change. No adds.
ponder judgeA two-key deliberation file is legal and prints warnings on deliberate, delta, and decide stop reminding you to explain in --why why fewer than three voices spoke. Here the Empath's change raises f-0014 above 0.5 confidence after running the case, moving confidenceFloor to 0.00:
ponder judge - pass 4 of 6
signal value reads as
coverage 1.00 12 of 12 screens graded
novelty 0.00 revising adds ÷ live findings
churn 0.07 revising deltas ÷ live findings
thrash 0.00 0 reversing deltas
surprise 0.02 predicted 0.05, got 0.07
stall 0 consecutive passes under 0.02 churn
confidenceFloor 0.00 open must-findings still guessing
voices 2/4 builder, empath
delta voices 2/4 builder, empath
advice: stop - novelty 0.00 and churn 0.07, two passes running. Further passes stopped changing the answer.
NEXT: decide - ponder decide stop --why "<reason>" --session ui-2026-08-24 # the engine advises stopponder decide stop --why "Coverage 12/12, two consecutive quiet passes, no open must-fix under 0.5 confidence. Pass 4 heard two voices because it was a targeted re-check of the invite screen and the last shaky must; passes 2 and 3 heard all four."
ponder report --out docs/ui-ponder.md
ponder apply --dry-run --severity must,shouldOnly a stop the engine advised for reason converged closes the session as converged; a budget stop, a perseveration stop or an override closes it as stopped, and report.md says which. ponder apply emits an ordered work plan grouped by unit, with evidence paths and recommendations. Ponder never edits the subject's source - it hands you the plan and you do the work. --dry-run prints and changes nothing; dropping it writes apply-plan.md and marks the session applied (terminal). Running apply on an open or aborted session exits 2.
Anti-patterns
Running one pass and reporting it as a ponder.
A pass whose deltas are all
add. You accumulated; you did not deliberate - andvoices 4/4does not excuse it, because that counts who spoke, not what changed.Predicting low churn every pass to look calibrated. It destroys
surprise, the only signal that says whether you understand the subject.deleteing a finding because it is low priority. Delete is for unsupported, duplicated, or wrong. Low priority is achangetoseverityorstatus: deferred- retracting it hides it from the ranking instead of ranking it.Deleting a unit from the inventory to clear a
blockedverdict. It does not clear it - a never-graded unit stays in the coverage denominator.Claiming
"phantom": trueon a route you never opened. Phantom means the thing does not exist. If you did not look, go look.unit-editing a path to something that does not exist and then claiming phantom on it. The engine checks every path the unit has ever carried and rejects the batch. It is the previous anti-pattern with an extra step.Manufacturing a delta on a quiet pass so it does not look idle. Zero deltas from four voices that each said what they re-checked is convergence; one invented
editis churn you have to defend inreport.mdfor ever.Hand-editing
units.jsonorfindings.json. It is a divergence, not a fix -judge,decide,reportandapplyrefuse it. Use a delta.Letting a fan-out agent call
ponder.Starting a fresh session after a compaction instead of running
ponder status.Looking for a way past
blocked- a flag, an env var, a hand-editedmetrics.json. There isn't one; coverage is recomputed at decision time. The time is better spent grading the unit.Treating a transcript in this file as the engine's contract. It shows the shape of a pass.
ponder statusand theNEXT:line show the truth.
Files
- ATTRIBUTION.mdAdded by AutoGineer849 B
- LICENSELicence file added by AutoGineer1.0 KiB
- SKILL.md48.5 KiB
- references/harness-notes.md14.4 KiB
- references/perspectives.md23.2 KiB
- references/protocol.md50.5 KiB
references/harness-notes.md
Harness notes - Claude Code, Codex, and OpenClaw
This skill is one directory, symlinked into every agent harness (~/.claude/skills/ponder,
~/.agents/skills/ponder, and ~/.codex/skills/ponder). Everything here is the set of
differences that actually change what you type.
Install
One source of truth, symlinked everywhere from a local checkout of Quinnod345/ponder:
git clone https://github.com/Quinnod345/ponder.git ~/code/ponder
~/code/ponder/install.shIt links skill/ponder into ~/.claude/skills/ponder, ~/.agents/skills/ponder (and
~/.codex/skills/ponder when ~/.codex exists) and bin/ponder into ~/.local/bin, then runs
ponder doctor. Re-running is safe - it replaces its own symlinks and refuses to clobber a real
directory. The equivalent by hand:
ln -s ~/code/ponder/skill/ponder ~/.claude/skills/ponder
ln -s ~/code/ponder/skill/ponder ~/.agents/skills/ponder
chmod +x ~/code/ponder/bin/ponder
ln -s ~/code/ponder/bin/ponder ~/.local/bin/ponderbin/ponder is a POSIX sh shim, not JavaScript. That is deliberate: an extensionless JS file trips
Node's module resolution. It walks its own symlink chain before exec node …/lib/cli.js "$@", because
without that a ponder symlinked onto PATH would look for ~/.local/lib/cli.js. Do not "fix" either
part.
Front matter
Only two keys, because only two keys are valid in both harnesses:
---
name: ponder
description: …
---Codex additionally understands an optional metadata: block - disable-model-invocation
(~/.codex/skills/zoom-out/SKILL.md), argument-hint (~/.codex/skills/handoff/SKILL.md) and
short-description (~/.codex/vendor_imports/skills/skills/.curated/linear/SKILL.md). Claude Code
reads the same keys at the top level instead, not nested - compare its own copy of zoom-out, which
carries a bare disable-model-invocation: true. So a metadata: block would make the two installs
behave differently from one file, and this skill has none.
The other rule the front matter has to obey is YAML's, and it bites in exactly one place: a plain
scalar cannot contain : (colon-space). The description is a long prose line full of quoted
trigger phrases, and one stray colon-space in it makes the whole block unparsable - which in both
harnesses means the skill silently does not load rather than erroring. After any edit to it:
python3 -c "import yaml,sys; d=yaml.safe_load(open(sys.argv[1]).read().split('---',2)[1]); \
assert set(d) == {'name','description'}, d.keys(); print('ok:', d['name'], len(d['description']))" \
~/code/ponder/skill/ponder/SKILL.mdChecking the install
ls -l ~/.claude/skills/ponder ~/.codex/skills/ponder # both should point at ~/code/ponder/skill/ponder
head -4 ~/.claude/skills/ponder/SKILL.md # front matter intact through the symlink
ponder doctor # engine reachable, and what it can seeIn Claude Code, the skill then appears in the available-skills list; /ponder invokes it, as does
the Skill tool with skill: "ponder". In Codex, skills under $CODEX_HOME/skills (default
~/.codex/skills) are picked up on the next turn after installation, not the current one - if it
does not fire immediately, that is why.
Invocation
Both harnesses model-invoke skills from the description, and both take an explicit /ponder. The
practical difference: Claude Code surfaces the skill list to the model every turn, so a trigger
phrase reliably fires mid-conversation. In Codex, a skill invoked deep in a long session sometimes
needs the explicit /ponder - if the user says "keep pondering" and nothing loads, read the SKILL.md
by path and carry on rather than debating it:
cat ~/code/ponder/skill/ponder/SKILL.mdSubagents and fan-out
| Claude Code | Codex | |
|---|---|---|
| In-process subagents | Agent tool. Multiple calls in one message run in parallel. Returns text to the parent. | None. |
| Very large sweeps | Workflow tool - handles batching, retries and collection better than hand-rolled parallel agents. | None. |
| Subprocess agents | possible, rarely worth it | codex exec - the primary mechanism |
| Background | Bash tool run_in_background, plus Monitor to wait on a condition | & + wait, or nohup … & and poll the output file |
codex exec flags that matter for fan-out:
codex exec -C "$PWD" \
--sandbox workspace-write \
--skip-git-repo-check \
-o .ponder/tmp/batch-3.txt \
"…prompt…"-C, --cd <DIR>- working root for the child.-s, --sandbox read-only|workspace-write|danger-full-access- the child's own sandbox, independent of yours.--add-dir <DIR>- extra writable directory, needed if the session state lives outside the workspace.-o, --output-last-message <FILE>- writes the child's final message to a file. This is what makes fan-out collectible. Have the child write its JSONL to disk anyway and return only the path plus a count; then-ois your receipt, not your payload.--output-schema <FILE>- a JSON Schema for the final response, when you want the shape enforced.--json- event stream as JSONL on stdout, for progress monitoring.--ephemeral- no session files on disk, for throwaway batches.
Two of those are load-bearing rather than optional, and both were checked on this machine against codex-cli 0.147.0:
--skip-git-repo-checkis not paranoia. Without it the child refuses before doing any work -Not inside a trusted directory and --skip-git-repo-check was not specified, exit1. Fan out over a subject that is not a git checkout and every batch dies at once, identically and instantly, which reads like a prompt problem and is not one.codex execreads stdin even when the prompt is an argument (Reading additional input from stdin...). Backgrounded with&it inherits the parent's stdin, so redirect it:… </dev/null &. From/dev/nullit takes the EOF and carries on; from a pipe nobody closes it does not.
codex exec starts a fresh session. It inherits none of your context, and it loads its own
AGENTS.md chain from -C. Everything the batch needs goes in the prompt or in a file it can read.
The session lock
The engine locks. Do not architect around a lost-update race - there isn't one. Earlier revisions
of this file said the opposite and told you to defend against a hazard that does not exist. Here is
what actually happens, read out of lib/session.js and reproduced on this machine.
lockSession() takes an exclusive lock on the session directory before any command that writes
state: units, predict, grade, deliberate, delta, judge, decide, apply, abort, and
verify --repair. The read-only commands - status, report, list, doctor, and a plain
verify - take no lock, so you can always ask where a session is even while a pass is being written
into it. verify is the only command whose locking depends on a flag, for the obvious reason: with
--repair it rewrites the state files, without it it writes nothing at all.
| Mechanism | open(.ponder/<slug>/.lock, 'wx') - atomic create-exclusive. The winner writes its pid and a timestamp into the file; the file's existence is the lock |
| Contending command | polls every 60 ms (Atomics.wait, no CPU spin) for up to 10 seconds |
| Wait exhausted | exits 1: another ponder command is already working on <slug>. - and names the lock file |
| Stale reclaim | a .lock whose mtime is older than 120 seconds is deleted and taken. This is what covers a kill -9 |
| Normal release | unlink when the command finishes, plus a process exit hook for process.exit() |
| Unlockable store | if the lock cannot be created for any reason other than EEXIST, the command runs without one. A safety net must not become a new way to fail |
What the loser of a real race sees. Two ponder delta calls fired at the same pass, measured:
A rc=2 error out of order: "ponder delta" satisfies revise, but this session owes judge.
B rc=0 ponder delta - pass 1, 1 delta appliedThe lock serialises them and the phase machine finishes the job. B takes the lock, applies its batch,
and advances the phase from revise to judge. A waits a few milliseconds, takes the lock, reloads
session.json from disk - and now owes judge, so its ponder delta is out of order and exits 2
without applying anything. The ledger grew by exactly one line, findings.json agrees with it, and
the phase advanced exactly once. Two ponder decide at once record one pass, not two. Two
ponder start on one slug: mkdir without recursive is the atomic claim, so the second exits 1
with session "<slug>" already exists.
The conformance suite pins this: 45 checks in concurrency: racing deltas have exactly one winner
and 14 more in concurrency: racing decisions and starts have one winner too, run over three fresh
sessions because a lock-free engine only loses the race some of the time. Making lockSession a
no-op fails both.
What this means for fan-out. The rule is unchanged - only the parent runs ponder - but the
reason is sequencing, not corruption. A race has a winner and a loser, and the loser's work is
refused, not merged. A subagent that calls ponder delta and does not check its exit code will
report success while its entire batch went nowhere. So: batch agents write JSONL to disk and return a
path plus a count, the parent concatenates, and the parent makes one call. That also keeps f-NNNN
assignment and the ledger in one place, which is where they belong.
Two practical notes. The 10-second wait is generous against a command that finishes in well under a
second, but a command stuck on a slow OCA bridge call (5 s per call) can outlast it - if a queued
command exits 1 on the lock, re-run it rather than deleting the file. And delete a .lock by hand
only when you know the process that made it is gone; otherwise wait, or let the 120-second stale
reclaim do it for you.
Sandboxing, and whether psql is reachable
Claude Code on this machine: the Bash tool is sandboxed, and the sandbox does not block the OCA.
Verified: psql "postgres://localhost/oneiro" -tAc "select 1" returns 1 from inside the tool. Writes
into the project tree are fine. If a bridge call ever does get blocked, ponder degrades silently by
design - check .ponder/<slug>/oca.log, not the engine.
Codex on this machine: ~/.codex/config.toml sets sandbox_mode = "danger-full-access" and
approval_policy = "never", so psql works and state can be written anywhere.
Codex under any other policy - including any codex exec -s workspace-write you spawn yourself.
The three below follow from Codex's documented sandbox semantics and were not reproduced on this
machine, because the config above makes the failure path unreachable here. Treat them as what to
expect, and check with ponder doctor rather than assuming:
Network is off under
workspace-writeby default.psqltopostgres://localhost/oneiroover TCP should fail. The bridge returnsnull, the loop runs identically, and you lose prior-pondering recall and the OCA writes. That is the designed degradation, not a bug - but do not promise the user cross-session memory from a run you made in that sandbox.Writes outside the workspace are blocked. The
~/.ponder/<slug>/fallback should fail. Keep the session inside the project withponder start --project "$PWD", or widen the child's sandbox when you spawn it -codex exec --add-dir ~/.ponder.--add-diris acodex execflag, not a ponder one;ponder start --add-direxits1withunknown flag --add-dir.read-onlycannot run a pass at all - every command in the loop writes state. The inspection commands that write nothing (status,list,verifywithout--repair) should still work, which is enough to find out where a session stands but not to move it.
ponder doctor settles all three in one call: it prints whether the OCA is reachable and which
store roots are writable. Run it inside the child sandbox, not outside it.
Rule of thumb: run ponder doctor as the first command in any unfamiliar harness. It reports node,
psql, the DSN, OCA reachability and where state will be written, which is exactly the set of things
that differ between these two environments.
Context and compaction
Claude Code compacts long sessions, and a compaction is the single most likely way a long ponder
dies. Codex has no compaction guarantee and a smaller effective working window in practice. The
mitigation is the same in both and it is already built in: state lives in files, and every command
prints NEXT:. After any loss, ponder status tells you what you owe; .ponder/<slug>/ledger.jsonl
tells you everything every pass did and why.
Practical consequence for Codex specifically: prefer sequential batches that write JSONL to disk and drop the detail, over holding 40 units' worth of code in one context. The disk is the memory.
Paths
Skill-relative references (references/protocol.md) resolve differently per harness -
~/.claude/skills/ponder/references/… vs ~/.codex/skills/ponder/references/…. Both are symlinks to
the same place, so when in doubt use the repo path, which is always correct:
~/code/ponder/skill/ponder/references/protocol.md
~/code/ponder/lenses/ui.mdSession state goes in <project>/.ponder/. It is plain JSON and JSONL. Commit it when the ledger is
worth keeping across branches and machines - that history is the point of the append-only design -
otherwise add .ponder/ to .gitignore. Do not commit .ponder/tmp/.
Known bites
codex exechangs with no output, including--version. Seen on macOS when codex is launched over SSH or tmux: a macOS Gatekeeper/amfid block keyed to the install path. Run a clean-path copy of the binary instead.A queued command that exits
1on the lock. Not corruption - the session lock did its job and the wait ran out. Re-run the command. See The session lock; do not delete a.lockfile unless the process that wrote it is gone.A skill edit that does not take effect. Both harnesses read SKILL.md at load; edit the repo copy (
~/code/ponder/skill/ponder/SKILL.md) and start a new turn - in Codex, a new session.The OCA's cognitive-loop process on
:3333is not running. Nothing in ponder depends on it; the bridge shells out topsqldirectly. If something suggests otherwise, it is wrong.
Requirements and compatibility
Written for: GitHub Copilot
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Names Codex tools, Needs Node.js
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- First committed by
Quinnod345
- Publisher
- GitHub (Official)
- Distributed by
- GitHub
- Source
- github/awesome-copilot · skills/ponder · commit 797337f
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
- Contributors
- Quinnod345
AutoGineer is not affiliated with or endorsed by Quinnod345 or GitHub.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download ponder.zip