Skip to content

Make harness startup and turns lighter - #240

Merged
justrach merged 1 commit into
release/v0.0.205from
codex/lighter-faster-harness
Jul 16, 2026
Merged

Make harness startup and turns lighter#240
justrach merged 1 commit into
release/v0.0.205from
codex/lighter-faster-harness

Conversation

@justrach

Copy link
Copy Markdown
Owner

What changed

  • Lazily materialize provider tool catalogs, Codex model catalogs, stored credentials, and other startup-only resources when they become observable.
  • Batch stored credential reads and run independent macOS Keychain lookups concurrently.
  • Run AI tab-title/header generation in a genuinely independent execution slot alongside the main model request, with the existing async fallback.
  • Remove the 500 ms terminal cursor-query penalty in terminals that delay or drop DSR replies.
  • Reuse context estimates, reset scratch allocations adaptively, and remove repeated serialization/allocation work from hot request paths.
  • Parse JSON control envelopes with turn-local ownership and keep --json stdout strict JSONL, including fallback response text.
  • Add long-session memory instrumentation plus live JSON and title-concurrency CI regressions; refresh generated SDK tool lists.

Why

Startup and lightweight REPL commands were paying for catalogs, credentials, schema rendering, and a terminal timeout before those resources were needed. Header generation could also serialize with the main turn. Long-lived JSON sessions retained transient envelope allocations.

Impact

  • Boot-to-prompt median: 5.3–8.2 ms in controlled default/provider/exact-model runs.
  • Lightweight command latency: roughly 500 ms down to 20–25 ms.
  • Title and main request arrival: 0.3 ms apart in the final concurrency regression.
  • Forty-turn JSON session-arena growth: 345 KB down to 200 KB (~42% lower); scratch remains flat at 9 KB.
  • ReleaseFast binary: 3,176,200 bytes; --version smoke peaks around 1.82 MB RSS.

Durable conversation history and all provider/tool behavior remain intact; expensive data is deferred, not removed.

Validation

  • zig build test --summary all — 215/215 tests passed
  • Default and ReleaseFast builds
  • JSON controls and strict live JSONL tests
  • PTY REPL, Markdown, gutter, overflow, spinner, and model-preference tests
  • Codex WS/SSE, compaction, stall/drop, and newer-issue E2E tests
  • Title/main concurrency regression
  • SDK Python/TypeScript validation and generation drift
  • Zig formatting, source-size guard, and git diff --check

@justrach
justrach merged commit bf3277f into release/v0.0.205 Jul 16, 2026
6 checks passed
justrach added a commit that referenced this pull request Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant