#6394 [GUI] preserve long-running desktop agent sessions

open · @Held0fTheWelt · 0 comentarios · En GitHub

Setup & installServer & APIMulti-GPUModels & quantsWindows

Descripción

## Problem and result

Long-running desktop agent sessions need to preserve their work when the user sends a follow-up, opens a helper's log, changes context settings, resumes a plan, or installs an update. This draft brings the corresponding changes from the integrated fork onto current main. Helpers keep their connection to the owning chat. The host carries visible replies, evidence, and checkpoints forward, and the desktop exposes the related options.

## Related discussion

Scope discussion is in #6342 and maintainer feedback is still pending. This is a draft for reviewing the dependency boundaries and the complete tested path. The bundled Harness stage check is already separate in #6391. The smaller drafts #6385, #6386, and #6390 expose individual parts of the shared behavior for review and have some overlap with this draft.

## Approach

- Keep the helper controls, transcript updates, runtime bridge, working memory and update checkpoints together. The updater reconnects helpers to the same chat state used by the live message path.
- Carry the Harness reply reserve and progress behavior through the host and local serving API. Bundle the profile settings for the optional Context Optimizer and shared RAM reserve with their frontend, runtime, and tuning paths.
- Keep the current main's merge resolutions for translations and tests. The Windows schema is generated output from the recorded fork, and the PowerShell cache ignore rule is retained from that source history.
- The draft head is based on `3142b66b9`. Its files match the corresponding final versions at `f289ab0c4` in the source fork. Checking Git blob IDs and file modes for all changed paths found that this draft (110 paths), #6383 (24), #6387 (4), #6391 (4), and #6393 (3) reproduce all 145 changed paths in that fork snapshot. The three integration merges are reflected in the resulting trees.

### Original changes covered here

- Helper controls, windows, logs, archives, and follow-ups: `10c95483`, `d01d0ff7`, `0587b902`, `02fc55d9`, `310ad572`, `1757d98f`, `bd59b1fb`, `d39ac810`, `78f27d9b`.
- Agent progress, limits, plans, and working evidence: `cfed7201` (agent portion), `47db9c4e`, `9034ca16`, `fda64220`, `76b17cbe`, `d7c0c5b8`, `157cb925`, `5ced3813`, `091f960f`, `7bdd9c67`, `4d1e189d`.
- Update pause, reconnect and integration: `8396fd6f`, `6cf60f8c`, `27bc807e`, `c46f2098`, `b9077e17`. The resolved upstream merge is `f289ab0c`.
- Context controls and desktop tuning dependencies: `c9e0f80b`, `e34a8346`, `977d26a5`, `d997d134`, `9fad8304`.

## Validation

**Passed:**
- Windows with Node 24.15.0, source tree `ac5cb8c563458c1342d8c697705e0208666bf1eb`, PR commit `c7865dfae`. `node --test --test-reporter=tap` on `agent-children`, `agent-context`, `agent-context-optimizer`, `agent-compaction-settings`, `agent-working-memory`, `agent-plan-brief`, `agent-turn-guard`, `agent-shape`, `agent-route-race`, `agent-goal-guard`, `resource-ram`, `component-updates`, `helper-log`, `agent-mcp-model-timeout`, `shell-languages`, and `native-autotune` under `app/host/tests` passed 138 tests. 35 were skipped with the staged Harness unset.
- From `app/host`, `npm ci --no-audit --no-fund`, `npm run typecheck`, and `npm run build` exited successfully.
- Windows with Python 3.14.4 and the pinned `regex==2026.9.10` in an isolated test dependency directory. `python -m pytest -q -p no:cacheprovider --basetemp terminal-context-verified-temp terminal/serve/test_context_overflow.py` passed seven tests.
- `git diff --check upstream/main...HEAD` and the source-tree coverage check passed.

**Failed:**
- The initial split removed the tuning snapshot implementation from the host. Host startup tests failed because the native control path still uses it. Putting the shared implementation back resolved these failures. Early tests also exposed missing local `esbuild` and `regex` dependencies. The reruns above used the locked dependencies and passed.

**Not run:**
- The 35 staged-Harness tests, a native installer build, hardware timing, and interactive desktop acceptance of the full flow.

## Limits

The draft preserves the integrated behavior of the fork and documents the overlap with narrower PRs. Decisions on review order, exposed options and which parts to merge are still open. The tests above do not establish GPU performance or real update and restart behavior.

En el sitio

Enlaces a install, modelos, releases.