# Open Runtime Gaps

This document tracks the remaining gaps that still matter against both OpenCode and Codex after the current `A1-A7` checklist was closed.

These are not feature-format gaps anymore. They are runtime-quality gaps.

## Current Estimate

- Versus OpenCode on our usecases: `5-10%`
- Versus Codex overall on our usecases: `16-22%`

The category set is now mostly the same for both baselines. The difference is how far ahead Codex still is on execution quality and runtime cohesion.

## Open Gaps

### R1. Long-horizon execution reliability
- Current severity: `P1`
- Why it still matters:
  - Long pricing/value-creation runs still face more drift under ambiguity than stronger runtimes.
  - Multi-turn repair and continuation quality is still the biggest practical gap.
- Current symptoms:
  - provider noise can still perturb decision flow
  - some scenarios still need explicit recoverable-error budgets
  - the model still needs stronger runtime support to stay on-track in long tool-heavy runs
- What closes it:
  - broader adversarial long-run evals
  - tighter runtime recovery behavior under mixed tool outcomes
  - better continuation discipline after repair

### R2. Delegation depth and re-entry
- Current severity: `P1`
- Why it still matters:
  - Subagents now receive structured context, but child work is still not fully re-entrant.
  - Parent/child coordination is better than before, but still shallower than stronger agent runtimes.
- Current symptoms:
  - child outputs are structured summaries, not rich typed deltas
  - limited nested delegation discipline
  - resumed delegated work is still less native than it should be
- What closes it:
  - typed artifact/dataset/plan deltas from child to parent
  - resumable child-session continuity
  - bounded recursive delegation policy with stronger merge semantics

### R3. Tool governance under ambiguity
- Current severity: `P1`
- Why it still matters:
  - Tool routing is now audited and partially governed, but not yet fully robust when the model is uncertain.
  - Stronger runtimes need less compensating guardrail logic.
- Current symptoms:
  - some scenarios still need explicit tool-use tolerance budgets
  - provider/tool noise can still cause avoidable fallback behavior
  - generic-vs-domain preference is improved but not fully automatic
- What closes it:
  - canonical error envelopes across more tools
  - stronger online route governor behavior
  - more scenario-specific routing assertions in evals

### R4. Adversarial eval breadth
- Current severity: `P2`
- Why it still matters:
  - The current live matrix is strong enough to catch many regressions, but it is still not broad enough to fully pressure the remaining runtime gaps.
- Current symptoms:
  - not enough delegated multi-turn cases
  - not enough mixed-noise or re-entry scenarios
  - not enough repeated ambiguous follow-up runs
- What closes it:
  - more multi-turn delegated scenarios
  - more provider-noise cases
  - more compaction/re-entry cases
  - more follow-up revision loops

### R5. Runtime/TUI cohesion in long sessions
- Current severity: `P2`
- Why it still matters:
  - The fullscreen TUI is now functional and auditable, but still not as seamless as stronger runtimes across long sessions.
- Current symptoms:
  - repair, delegation, and long-run operator state are visible, but still not as frictionless to inspect as they should be
  - the operator experience during extended runs is improved, not finished
- What closes it:
  - stronger long-session state inspection
  - clearer live operator visibility into delegated work and current TODO state
  - less friction around long-run navigation and audit surfaces

### R6. Provider-noise isolation
- Current severity: `P2`
- Why it still matters:
  - External systems like AA, web fetch, and other live services still introduce noise into otherwise-correct runs.
- Current symptoms:
  - some scenarios still require recoverable-error budgets
  - connectivity can be green at run start but noisy during the actual scenario
- What closes it:
  - smarter scenario-level fallback policy
  - stronger provider-local caching/fallback behavior
  - cleaner separation between agent failure and external-provider flakiness

## Interpretation

### What is no longer the problem
- not skill file format
- not slash-command structure
- not lack of an agent TODO primitive
- not lack of structured stage tracking
- not lack of subagent context forwarding

### What is the real remaining problem
The remaining gap is mostly:
- execution quality under ambiguity
- deeper delegation continuity
- resilience against external noise
- broader runtime hardening through eval pressure

### Why the same gaps show up vs both OpenCode and Codex
The categories are now shared because the product shape is already close enough.

What differs is the degree:
- OpenCode is closer because the architecture is more similar.
- Codex is still further ahead because its runtime behavior feels more automatic and more reliable under real multi-step work.

## Easiest Implementation Order

This order is based on implementation ease, not strategic impact.

1. `R6` Provider-noise isolation
   - mostly caching, fallback, and scenario-budget cleanup
   - lowest architectural risk
2. `R4` Adversarial eval breadth
   - mostly harness and scenario expansion work
   - straightforward, but time-consuming
3. `R5` Runtime/TUI cohesion in long sessions
   - mostly operator-surface polish and state visibility
   - moderate scope, limited deep runtime risk
4. `R3` Tool governance under ambiguity
   - requires runtime behavior changes, not just evals
   - more sensitive because it can change agent behavior broadly
5. `R2` Delegation depth and re-entry
   - needs stronger parent/child state and merge semantics
   - more architectural coupling
6. `R1` Long-horizon execution reliability
   - hardest because it is an emergent runtime-quality problem
   - usually improved by multiple other fixes plus harsher eval pressure

## Highest-Leverage Order

If the goal is fastest gap reduction rather than easiest implementation, the better order is:

1. `R1` Long-horizon execution reliability
2. `R3` Tool governance under ambiguity
3. `R2` Delegation depth and re-entry
4. `R4` Adversarial eval breadth
5. `R6` Provider-noise isolation
6. `R5` Runtime/TUI cohesion in long sessions
