# One final response per run

Requested after the retained generation panel, completion tool arguments, and
final receipt displayed the same answer three times, with the final copy losing
Markdown structure.

## Presentation contract

- Preserve the accepted assistant reply, including paragraphs, lists, indentation,
  code fences, tables and exact JSON values. Storage summaries remain separate.
- Show one expanded final answer per run/agent. Do not promote proposed
  `task_complete` arguments before acceptance.
- Keep generation handling, retries, raw contracts and operational receipts in
  compact disclosures. Successful settlement must not leave a second expanded
  answer; explicit inspection can still reveal retained diagnostics.
- Preserve real partial output and truthful failed/interrupted states. Do not
  infer acceptance from a tool name, tool-call arguments, or matching prose.
- Use stable document ownership rather than deleting nearby matching text.
- Carry the same accepted reply through JSON mode, browser delivery, persistence
  and TUI resume. Avoid duplicate native media previews and playback.

## Work

- [x] Parallel review of native generation/completion, main/child event paths,
  CLI/browser transport, formatting sanitizers, and restoration.
- [x] Format-preserving user-reply sanitizer and accepted-reply JSON selection.
- [x] Main/child response ownership and removal of redundant lifecycle output.
- [x] Settled inference disclosures and a minimal rich final document.
- [x] Canonical resume excludes successful completion-control copies while
  retaining rejected completion evidence.
- [x] Browser waits for accepted output rather than promoting tool arguments.
- [x] Guard duplicate media rendering/playback owned by native modules.
- [x] Meaningful regressions, mandatory transport suites, private typecheck and
  actual terminal fixture verification.
- [x] Scoped commits and push to `origin/main`; record receipts and limits.

## Boundaries

Keep unrelated dirty work and publishing outputs intact. No model inference,
model loading, installed-client replacement or production-daemon changes are
needed to verify this presentation repair. Test fixtures must identify mocked
inference separately from actual terminal/browser rendering.

## Verified changes

- `66e68437`: canonical session restore keeps one rich assistant reply and omits
  successful completion-control copies; rejected or unknown outcomes remain
  collapsed evidence. Old imported copies are retired by exact block identity.
  Nine session restore tests passed.
- `c6de96d6`: format-preserving accepted-reply selection across CLI, API,
  persisted browser sessions and live browser delivery. Removed speculative
  completion-call promotion and automatic post-answer follow-up inference.
  Verification: 85 tests/6 suites including mandatory transport checks, 54
  actual Chromium fixture checks, and CLI no-emit passed.
  [Browser receipt](../work-orders/evidence/final-reply-browser-20261016.json).
- `ab17b145`: active technical chatter collapses; settled generation becomes a
  compact disclosure; final output is a rich document with a small receipt.
  Fixed blank finalized native Markdown, preserved failed/interrupted partials,
  and migrated old saved generation panels. Verification: 60 tests/9 suites,
  12 actual VTE checks across five sizes, and CLI no-emit passed.
  [Native receipt](../work-orders/evidence/native-completion-presentation-verification-20261016.json).
- `4a3f1153`: README reduced from 893 to 101 lines of structural overview.
  Removed free-provider/fallback copy, release detail and repeated inventory;
  the sync script now retains a short link to the canonical API reference.
  REST inventory, README sync, manifest, example checks and two endpoint tests
  passed. Full `docs:check` reports stale generated slash-command documentation;
  a separate discovery check also reports stale `docs/DISCOVERY.*`. Those
  unrelated generated files were not overwritten or staged.

Test counts overlap and are not a unique repository-wide total. Live UI checks
use controlled events and owned fixture files; they do not perform inference.

- `717e54c9`: main and child response ownership preserves the accepted document,
  fences late events after interruption/reused child views, removes text-match
  deletion, and avoids duplicate native media preview/playback. Session-context
  persistence retains the complete formatted reply instead of flattening/capping
  it at 1,200 characters. Focused lifecycle verification: 97 tests/10 files and
  CLI no-emit passed. Root integration rerun: 20 tests/4 files and a separate
  CLI no-emit passed.
  [Lifecycle receipt](../work-orders/evidence/tui-response-ownership-verification-20261016.json).

## Delivery limits

Completed source commits are pushed to `origin/main`; installed clients,
services, shared build outputs and publishing artifacts are unchanged.
Externally launched subprocesses still expose their raw process logs. They are
not treated as structured accepted-response receipts; the current Omnius child
prints one corrected final, but arbitrary older/external programs are not
rewritten or deduplicated heuristically.

The root integration rerun reported a scratch-directory teardown warning from
an asynchronous identity save; all assertions passed. It did not perform model
inference. Full documentation drift checks remain limited as recorded above.
