# Evaluation log

## Product steering and plan

- User confirmed the default persona: starts `/goal`, expects prompt useful
  continuation, uses ordinary pause/resume. Background orchestration and extra
  cost controls are optional.
- Updated the earlier issue-resolution product decision before technical work.
  The current branch's unconditional backoff is provisional; #90 stays accepted.
- Wrote the product plan, alternatives, ten human-style journeys, prototype
  protocol, implementation sequence, regression gates and follow-up boundaries.
- Installed CLI is Pi 1.0.0. The repository provides actual-SDK workers, local
  provider fixtures and PTY capture/emulation that can support the evaluation.
- Initial model discovery with `refreshOnCreate:false` did not populate auth
  availability; the normal offline SDK initialization sees configured credential
  provider identities. No secret values were displayed or copied.

## Comparative probes

- Built repeatable actual-SDK probes using the real `/goal-direct` command and
  isolated copies of original `64c5ace`, current `3551bcc` and a candidate opt-in
  policy. Prototype changes are generated by `experiments/continuation/prepare.mjs`
  and remain outside the shipped extension sources.
- All 20 controlled probes matched expected observations. Unconditional default
  backoff delays two distinct reasoning responses and actual custom-tool report
  writes. Default-off candidate behavior matches the original. Pure idle replies
  are paced when selected; repeated `bash: ls .` still evades the heuristic.
- Existing strict wait was tested with a registered producer: observed quiet
  interval, duplicate wake signals admitted once, correct result and archival.
- Added a negative release probe: disabling a pending delay initially left it in
  force and exited 1. Retained that failure, then fixed the prototype's scheduler,
  claim/accounting preference checks and UI rescheduling hook. The same probe now
  passes; production still needs the port and permanent regression coverage.

## Human-style and real-model journeys

- Real terminal: `/goal`, rich confirmation, Escape pause during visible work,
  `/goal-status` at normal/narrow size, `/goal-resume`, independent fixture audit
  and archival. Actual artifact and requests inspected; no added scheduling setup.
- Terminal settings exposed a pre-existing UI defect: no `Scope:` entry reaches
  the existing scope handler. Prototype added it and a plain-language advanced
  opt-in row. Verified global true, inherited project true, explicit project false
  and removal of the override through keyboard choices and persisted files.
- A terminal bridge reached its own four-minute capture ceiling during extended
  settings exploration; started a separate settings-only project to finish the
  inheritance walkthrough. No model requests were needed for those settings.
- Third actual terminal run exercised opting out while a paced goal was running.
  Its next productive request started 16ms after the preference changed, without
  resume, then produced the correct artifact, audited and archived. Captured the
  visible delay, final state and action/request trace.
- Configured OpenCode auth was expired; moved to an already configured OpenRouter
  model. The first real-model attempt hit the harness's 20-request ceiling during
  review, after producing correct code/tests. Retained the failed record, raised
  the ceiling to 40 and made execution errors fail promptly.
- Actual `openrouter/deepseek/deepseek-v4-flash` runs passed: current policy
  19 requests/71.4s; candidate 21/66.9s; candidate with ordinary wording and no
  auditor terminology 12/74.1s. All completed with the actual auditor and passing
  independent artifact assertions; no dependencies or scheduling declarations.
  Treat these as individual observations, not a causal cost/performance ranking.

## Fixes to the evaluation and final checks

- Fixed an incomplete UI stub by using the SDK's full headless UI for boundary
  tests. Real terminal tests remain separate from those scripted scenarios.
- Corrected the preference probe/plan to preserve existing string-boolean parsing.
  Seven resolution/reopen checks and three invalid-value rejections pass.
- Prototype typecheck caught the new settings section missing from its union;
  fixed and rechecked. Repository typecheck/lint, explicit experiment lint,
  prototype extension typecheck and Python syntax pass.
- Kept timers armed through the quiet-window sample and recreated controlled
  fixture directories on each run to avoid false passes or leftover goals.
- Committed compact evidence, source refs, commands, readable terminal frames,
  artifacts, failed attempts and before/after opt-out evidence in `VALIDATION.md` and
  `evidence/`. Detailed generated projects/transcripts stay in ignored runs.
- Updated the product decision first, then the implementation plan. The full
  default-off production implementation and its permanent release gates are
  explicitly pending; the earlier 1,127-test result is not reused as proof of a
  future implementation. No shipped runtime sources or README changed here.

## Context, speed, UX and official comparison follow-up

- User explicitly requested optimization for context, speed and usability, plus
  searches of Codex/Claude documentation. Updated `PRODUCT.md` first, then
  `TECH.md`; kept the confirmed ordinary-user workflow and explicit opt-in scope.
- Read official Codex Goals and prompt-caching/compaction documentation, and
  Claude Code's goals, Stop-hook guards, known background waits and caching docs.
  Saved sourced differences and Pi-specific inferences in `RESEARCH.md`. Neither
  competing product was run. Did not copy a default cap or add a per-turn model
  evaluator on the strength of those sources alone.
- Added `efficiency.mjs` and `profile-worker.mjs`: 24 fixtures × 3 isolated source
  copies have identical parent request bytes and matching child size breakdowns.
  Existing 24-fixture context gate passed without refreshing baselines.
- Ran 19 additional actual-SDK scenarios through normal `/goal` confirmation.
  Measured payload growth, draft/executor/auditor calls and local dispatch. The
  candidate adds no classification call; distinct reasoning/custom tools reach
  their artifact/audit without the unconditional policy's delay. Explicit waits
  remain quiet and duplicate producer signals yield one wake. No new paid calls.
- Counterfactual no-tool guards stop repeated idle text and also cut off the
  distinct reasoning fixture. Existing `maxAutonomousRuns=4` stops through the
  actual product. Repeated `ls` remains a false negative for the pacing heuristic.
  Recorded unbounded default-loop cost instead of claiming universal optimality.
- Measured warm and invalidated-settings entry costs separately. Disabled pacing
  took zero goal-content snapshots. Small lookup overhead is measured honestly;
  no extra settings cache or classifier is justified by the microsecond timings.
- A prefix-invariance assertion failed: the first work tool changes the leading
  system prompt despite unchanged schemas. Preserved that observation instead of
  dropping the first request. `profile-boundary.mjs` reproduces stale draft-only
  guidance and a missing fresh-custom system prompt with two fixture tools and
  **without importing pi-goal-x**. Traced Pi 1.0 custom-trigger preparation versus
  its next-response refresh. Added a supported host/API compatibility release
  gate; no private host patch or upstream message was made.
- The initial performance UI stub omitted SDK defaults and timed out before work;
  corrected it to use `createContext().ui` and reran the campaign. Final evidence
  distinguishes byte equality, live prefix transitions, local timing, actual
  usage counters and modeled policies. `PERFORMANCE.md` records release budgets
  and pending gates. Production implementation and final UI copy/layout remain
  pending; the earlier full-suite result is not reused as a new production pass.
- Follow-up validation passed: repository typecheck/lint, explicit lint of all
  continuation helpers, diff whitespace checks, 37 local documentation links,
  evidence/cardinality/measurement-budget assertions and the unchanged 24-fixture
  context gate. No production source, dependency, root README or unrelated spec
  changed. The supported-host prompt/profile resolution remains an explicit gate.

## Production implementation — 2026-10-24

- User authorized the complete implementation, Pi prompt/profile resolution,
  standard-user end-to-end testing and a new branch/concise PR. Created
  `codex/continuation-defaults-and-prompt-profile` from the evaluated branch.
  Updated the product and technical plan before production changes.
- Ported default-off `idleContinuationBackoff`, sparse inheritance/provenance,
  live preference application, restoration/claim/status/accounting gates and
  zero default goal-content snapshots. Added permanent defaults, live edits,
  legacy metadata and allowance-preservation regressions; retained #90.
- Implemented request-only prompt/tool projection through public host hooks and
  transcript APIs. First executor requests now have the execution profile after
  direct creation, drafting, resume and reload. Preserve external instructions,
  head overrides, tool pairs, metadata and cache markers without private patches
  or an extra model turn. Added real-library tests so SDK stubs cannot silently
  skip this repair's coverage.
- Added four actual-SDK user-command journeys with correct artifacts and real
  auditor reads. Fresh production evidence records each journey's requests,
  choices and stable executor prompt. All use isolated settings/projects.

## Implementation setbacks and fixes

- The first full suite found `/goal-refresh` left the settings cache cold after
  rescheduling, hiding the next external edit from its diff. Warm the explicit
  snapshot after refresh; the existing cross-process refresh regression passes.
- An initial normalization assertion expected invalid values to throw during
  parsing. The established parser reports diagnostics; mutation rejects them.
  Corrected the test to retain that API contract and verified both paths.
- Actual terminal pacing initially added rows beneath the stable-height widget,
  clipping its footer. Reused the existing status row for relative/local timing
  and resume. Final 110×32 and 72×20 captures and height regressions pass.
- Parallel host checks initially shared a fixed context-capture directory. Added
  an isolated capture-directory environment override and reran the matrix.
- Pi 0.86 has structured transcripts but lacks the newer full-context event;
  using its public `context` event repairs that path. Pi 0.87 already has the
  transcript helper, so tests now detect capability rather than guessing by
  major version. Classic 0.83–0.85 retain their native path.
- Extended checks to current Pi 1.4, matching issue #100's environment. Its event
  union exposed the assumption that every `before_agent_start` contains `prompt`.
  Handle its public custom-message trigger as well, preserving checkpoint
  identity and stale rejection. Both trigger shapes have golden regressions.
- Review found additive leading content could lose cache markers when converted
  to a string. Preserve its content blocks and add a real-library regression.
  Typecheck caught a nullable test fixture index; corrected the fixture before
  the final suite/matrix. No skipped tests are hidden in the final root suite.

## Production validation

- Typecheck and lint pass. Final full suite: **1,145 passed, zero failed/skipped**;
  discovery is 78 unit, 1 integration and 6 e2e files. Retained provider recovery,
  compaction, strict wait, lifecycle, token/run-limit and #90 checks pass.
- Seven isolated host installations pass typecheck, 37 SDK checks per host and
  real provider serialization: 0.83.0, 0.84.1, 0.85.1, 0.86.0, 0.87.0, 1.0.0,
  1.4.0. CI now retains the new user/profile checks and the missing host boundaries.
- Actual Pi CLI: rich `/goal` confirmation, Escape during a pending write,
  narrow status, resume, audit and archival. Settings scope, global opt-in,
  explicit project false and override removal work through keyboard choices,
  with zero model requests for settings. Runtime opt-out dispatches in 19.5ms
  locally and changes spent runs from 3 to 4 rather than renewing the allowance.
- Production real-model coding goal passes with ordinary wording and actual
  audit: 18 requests, 75.7s, five artifact tests, independent assertions and zero
  scheduling declarations. SDK-reported cost $0.002819. This is one observation,
  not a causal latency/cost ranking or representative-user study.
- Repeated production efficiency campaign: 72 equal-state captures and 19 SDK
  scenarios pass; no new default payload, no pacing snapshots when disabled,
  one executor prefix variant, explicit wait quiet and duplicate wake admitted
  once. Unbounded default idle behavior remains visible in harness-ceiling cases.
- Context gate: all 24 existing fixtures pass without baseline changes. Provider
  crosscheck: six SDK and three Responses payloads pass. Retention checks through
  4 MiB histories, same-machine 105-row runtime regression gate, package dry run,
  six publication checks and five ranking checks pass. Benchmark setup used an
  on-disk archive after Node's default stdout buffer proved too small.
- Final product/technical status points to `IMPLEMENTATION.md` and compact
  `evidence/production/` records. Earlier prototype reports remain historical.
  README, dependency pins and the unrelated pre-existing spec remain unchanged.
- Rechecked open issues: #90 and #100. #90 is fixed; #100 gains optional pacing
  and stays open because immediate unlimited defaults can still loop. No issue
  state, upstream report or producer integration was changed.

## Current SDK follow-up

- User asked for the branch/PR to reflect the latest Pi release. The follow-up
  `../2026-10-24-pi-1-4-compatibility/` pins Pi 1.4, uses native custom startup,
  handles its settlement abort flag, adds `max` thinking and updates CLI probes.
  The original 1.0 evidence above is preserved rather than relabeled.
