nyx expedition post-mortem + upgrade plan

Goal in.Finished work out.

You should be able to say "I want this, figure it out" and get researched, architected, built, verified work back, with anything that genuinely needs you saved for the very end. This report covers the livelock that burned 22 hours this week, the fix that landed today, what Expedition actually is right now, and the shortest path to the real thing.

111 dispatches of one already-finished increment, one every 10 to 12 minutes, from Jul 17 16:09 to Jul 18 14:00. The work itself landed on dispatch 1. Green is where the loop was stopped and the engine patched.

01 · INCIDENT · epic 6CGrCLTFIXED 2026-07-18

One broken command, zero brakes

The "build the Expedition adaptive loop" epic finished its fourth increment on the first try: architect.ts and build.ts written, tested, committed. Then the engine spent 22 hours re-doing it. Every cycle re-verified the same landed code, wrote another evidence-note commit, reported complete, and got re-dispatched.

111
plans dispatched for one increment
137
whole-tree verifies, 137 failures, one identical error
22h
of compute and tokens on finished work
0
retries charged: the loop path had no budget
Trigger

The whole-tree gate runs vitest run --project unit after increments land (verify-scope.ts UNIT_FLOOR).

Defect 1: broken gate

No vitest workspace ever defined a project named unit. The command exits 1 with "No test files found" every run, regardless of code health. The gate could not go green.

Defect 2: no brakes

On gate failure the controller re-pends the just-landed increment as the suspected culprit. Unlike every other retry path, this one charged no retry budget: fail, re-pend, re-dispatch, forever.

Defect 3: blind ledger

The increment row's attempts field is vestigial (always 0); the real counter lives in audit rows that this path never wrote. Nothing could see the loop from inside.

Defect 4: watchdog watches

The supervisor has no repetition detector, so a loop with live workers and fresh commits read as healthy. Worse, its singleton lease was held by a dead pid since Jul 17 22:14, so respawns exited as duplicates. Both fixed same-day: dead-holder lease steal, a marathon_livelock detector (6+ dispatches of one increment in 3h), and auto-stop recovery through the epic API.

02 · REMEDIATION · commits 99f8f72e, 2b9b0c9dLANDED + TESTED

Bounded, then fail open, loudly

Three changes landed on the live branch today. The principle behind all three: a broken gate must degrade into a loud caveat, never an infinite loop, and the queue keeps moving.

  • The gate is real now. vitest.workspace.ts defines the missing unit and e2e projects (*.e2e.test.ts is the split). Their union is byte-identical to the old full suite, so nothing else changed behavior.
  • Every verify-failure path has brakes. Both the cadence gate and the pre-completion gate now charge the same shared retry budget as every other failure path (2 retries). After that they fail open: the increment stays committed, the cadence marker advances so the same gate cannot re-fire, and a full_project_verify_failopen audit row records exactly what was skipped and why.
  • A regression test pins it. An always-failing verify now drives a 3-increment epic to completion in exactly 5 dispatches. Before the fix that test loops forever.
// the shape of the fix, both verify paths
if (verify.verdict === "fail") {
  if (retries < MAX_INCREMENT_RETRIES) {  // shared budget, audited
    repend(increment); charge(retry); return;
  }
  advanceCadenceMarker();                 // same seq cannot re-fire
  audit("full_project_verify_failopen"); // loud caveat, not a livelock
  // increment stays committed; epic continues
}

Alongside the code: protocol rule 12. Rule 10 already banned needing you present to reach done. Rule 12 shapes the plan itself: every step only a human can do (money, credentials, app-store or legal submission, external PR approval) is enumerated at spec time, pushed to the terminal leaves with everything drafted, and surfaced as an end-of-run operator items rollup. Mid-chain stop-points like the ME2 pause are retired; the queue was reopened the same hour.

03 · CODE AUDIT · src/planner/expedition4 OF 8 INCREMENTS BUILT

An engine kit, not yet an engine

Expedition is a bounded orient, decide, dispatch, observe loop: state carries a goal, findings, budget, and move history; a decider (one cheap structured LLM call behind deterministic guards) picks the next move; moves do the work. The pieces that exist are well-built. The pieces that make it a system are the ones not built yet.

PieceWhat it doesStatus
loop + deciderGuardrails first (step ceiling 40, call + token budgets), then one capped LLM decision; malformed output degrades to research, never crashesBUILT
research moveFans out up to 4 parallel searches (WebSearch + exa), 30s cap, returns confidence-tagged findings with citationsBUILT
architect moveFindings to Design {stack, modules, risks, open questions}; validates module paths against the real repoBUILT
build moveDelegates one bounded chunk to the marathon engine; maps verdicts verbatim, cannot launder a failureBUILT
feasibility gatePhase-zero: classify the goal, probe live dependencies, kill doomed goals before they burn a marathonMISSING
stuck detector + diagnoseSemantic loop detection and a recovery move. The decider already names diagnose; choosing it today hard-exits the loopMISSING
recon memoryCache what research already learned; today every run re-searches from zeroMISSING
wiring + guardrailsRegister the moves, hand the loop runPlan and a search provider, rewire /expedition. Without this, nothing can invoke the loopMISSING

The /expedition command you can type today does not touch any of this. It prepends one paragraph of research-first flavor to a normal marathon epic. That is why your instinct is right that you still do the research yourself: the adaptive engine exists on a branch, unplugged.

The eight gaps between here and "figure it out"

  • Not invocable. Increments 5 to 8 unbuilt; no assembly point wires moves, runPlan, or a search provider.
  • No feasibility gate. A doomed goal (an undeletable stock-iOS app, say) burns a full marathon instead of dying in phase zero with alternatives.
  • Recovery is retry-shaped, not switch-shaped. Same brief retried twice, then fail. No diagnosis, no strategy change, no never-retry-identical-args rule.
  • Research depth ceiling. Confidence tags come from a snippet-grouping heuristic; no synthesis pass, no adversarial check, no claim reconciliation.
  • Shallow architecture validation. File-existence checks only; nothing probes an API before code gets written against it.
  • Human-gate deferral is half-built. Secret gaps already park-and-continue (the right shape), but there is no money boundary, no cost cap, no end-of-run operator rollup.
  • The attempts ledger is invisible. Retry counts live as audit-row counts; the decider cannot reason about attempt history.
  • Tool acquisition is static. Workers get WebSearch + exa. Nothing can decide "this goal needs Playwright, a Kalshi key, a new MCP" and provision it.
04 · EXTERNAL RESEARCH · 28 sourcesFIELD SCAN

What the best systems already know

Surveyed the current long-horizon agent field: Anthropic's harness and C-compiler write-ups, OpenAI's 25-hour Codex runs, Cognition's multi-agent findings, OpenHands, Gemini Deep Research, plus the verification-horizon literature. Thirteen patterns worth stealing, grouped by what they buy us. Full source list in the footer.

Ledger discipline

  • Passes-only feature ledger: the goal expands into testable features; sessions may only flip a passes flag, never rewrite the list. Kills scope laundering with one rule.
  • Frozen "done when": completion criteria written before build starts, so done is checkable, not vibes.
  • Initializer role: the first session builds only the harness: spec, ledger, init script, smoke test.
  • Startup checklist: read ledger + git log, run the smoke test, then work. One feature per session.

Verification

  • Clean-context adversarial verifier: a reviewer with zero shared context inspects work against the spec; a fresh context is a smarter critic.
  • Separate grounding pass: citations and claims verified after synthesis, not during.
  • PR-as-approval-artifact: every deliverable is a reviewable diff citing its test logs.

Recovery

  • Semantic stuck detection: OpenHands ships five concrete patterns (4x same action + observation, 3x same error, 6-cycle ping-pong...) checked every step, with a hard halt + recovery handoff. Our livelock is textbook pattern 1.
  • Oracle partitioning: when everything wedges on one blocker, use a known-good reference to split it into debuggable shards.
  • Effort-scaling budgets: explicit token and subagent budgets per goal-complexity tier, set by the orchestrator.

Autonomy shape

  • Reversibility-keyed actions: reversible acts run on autopilot; irreversible ones (spend, publish, send) accumulate in an approval queue. Nothing blocks mid-run.
  • Human steps as terminal leaves: extracted at plan time, fully drafted, delivered as one end-of-run review sitting. Now our rule 12.
  • Tool ladder: local tools, then MCP-registry search + runtime install, then package + glue code, then browser automation as the universal fallback. New capabilities persist as skills.
05 · UPGRADE PLAN · four wavesW0 DONE, W1 QUEUED

Shortest path to the real thing

W0
today

Stop the bleeding (shipped)

Gate fixed, both verify paths bounded + fail-open, regression test, rule 12, queue reopened with the ME2 stop-point retired, expedition resume queued at seq 62.5. Supervisor hardened the same day: dead-holder lease steal, marathon_livelock detector, auto-stop recovery (206/206 tests green). The full v2 spec (durable runs, probes, capability ladder, dogfood gate) is written and queued at seq 62.7.

W1
queued

Make the loop real (increments 5 to 8, seq 62.5)

Feasibility gate, stuck detector + diagnose move, recon memory, and the wiring that makes /expedition actually run the adaptive loop. This is the difference between a kit and an engine, and it is already specced.

W2
next spec

Research that earns trust

  • LLM synthesis + adversarial verify pass over findings (replace the snippet heuristic); citations checked in a separate grounding pass
  • Deep-research skill wired in as the heavy tier; recon memory persists across goals
  • Architect upgrade: probe the live API before designing against it ("specs lie, probe first")
W3
then

Goal-to-done shape

  • Passes-only feature ledger + frozen "done when" generated at decompose time
  • Rule 12 enforced in code: human-only steps auto-extracted to terminal leaves; epic ends with an OPERATOR ITEMS rollup, drafts attached
  • Semantic stuck detection (the five OpenHands patterns) wired to the watchdog so it recovers instead of pinging; attempts surfaced in the ledger view
W4
then

Tools on demand

  • Capability planner: goal names its needed tools; MCP-registry search + runtime install, package + glue fallback, browser automation floor
  • Acquired capabilities persist as skills so acquisition compounds

How your ask would flow through it

GOAL: "use the Kalshi and Polymarket APIs, figure out how people make money on how these are built, then build it"
feasibility
Probe both live APIs + fee schedules. Viable: cross-venue arbitrage exists, Polymarket pays makers 20 to 25% of taker fees as rebates, Kalshi taker fee peaks at 1.75c per contract at 50c. Known risks logged: legging risk on non-simultaneous fills, resolution-criteria mismatches between "equivalent" markets.
research
Field scan with adversarial verify. Public bots are mostly buy-YES-here + buy-NO-there under $1 combined; the durable edges are passive market-making for rebates and matched-event spreads. Market matching across venues is the error-prone part; that becomes a named risk in the design.
architect
Design validated against reality. Matcher (the hard part), execution with position caps, paper-trading mode first, kill switch. Open questions probed against the live APIs before any code.
build
Marathon increments, each verified. Paper-trading results are the acceptance evidence, not vibes.
operator items
The only things left for you, at the very end: fund the accounts, generate the API keys (checklist drafted), approve real-money go-live with the paper P&L in front of you.

Same shape for the other asks. "Find and patch vulnerabilities": feasibility scopes the attack surface, research maps CVE classes, build ships patches with tests, you review the diff. "Undeletable loud-alarm iPhone app": feasibility kills the literal version in phase zero (stock iOS forbids undeletable third-party apps), proposes the honest nearest things (MDM-supervised device, Screen Time restrictions, critical-alerts entitlement), and the only terminal human item is the Apple developer account.

06 · LIVE STATE · marathon_queueMOVING, NO HUMAN GATES

Where the queue is right now

83 items done. The chain ran fe1 through the Mercury wave autonomously on Jul 16, then sat two days at a mid-chain operator pause. That pause pattern is retired under rule 12: everything below runs without you, and anything that truly needs you arrives at the end, drafted.

seqitemstatus
62ME2: Discord production reference connectorNEXT UP
62.5Expedition loop: resume increments 5 to 8 under the fixed gatePENDING
63FBM1: FBM Sniper Mercury business packPENDING
64 65VF1 + VQ1: motion-graphics studio, video quality + distribution gatePENDING
66CE1: content lifecycle + Instagram connectorPENDING
67PP1: multi-tenant business pack platformPENDING
68AP1: autonomy proof + chaos qualificationPENDING
69, 100.xRE1 (design rejected) + five backburner itemsPARKED BY DECISION

Parked rows are business decisions, not stalls: rule 12 keeps those distinct on purpose.