Skip to content

Fix agent-wall event reconciliation, viewport overflow and image memory overhead #15

Description

@sarthakagrawal927

Why

Owner reports unreliable agent-session state, unwanted scrolling in the full-screen agent wall, and roughly 250–300 MB app RAM.

Scope

Fix confirmed hook/snapshot ordering defects without inferring conversation identity from shared hosts. Fit the existing RAM-weighted wall to its viewport. Reduce decoded artwork/icon memory while preserving visual assets and sampling capability. No provider config changes, process termination or installation. Release was subsequently authorized; see verified public release below.

Evidence

Live installed PerformanceDaddy footprint: 192.5 MiB, peak 307.2 MiB; vmmap reports ~49.9 MiB CG Image regions and ~21.9 MiB Image IO regions. StorageDaddy currently has ~39.2 MiB resident memory, so the reported footprint does not apply uniformly to all apps. Disk/download size is not runtime memory. The wall explicitly adds 120 px per tile above eight. Shared-session signals are only classified at receipt when a matching process is already in the current snapshot.

Tasks

  • Regression-test and fix early hooks/missing-snapshot reconciliation.
  • Remove forced wall overflow; verify dense and single-session fixtures.
  • Bound image decoding at display resolution and verify decode budgets.
  • Measure a controlled local candidate; report improvements without promising 10x or comparing different workloads.
  • Run relevant tests and record native UI verification limits.

Shared MCP work is tracked in sarthakagrawal927/daddyrad#7.

Local validation — 2026-10-02

Early hooks are buffered by exact process identity plus session key and reconciled on inventory arrival. Recent state and session links survive incomplete snapshots; confirmed native exits prune links. Added startup/shared-host/PID-reuse regressions. The RAM-weighted wall uses its viewport without a ScrollView; native offscreen fixtures for 1, 6 and 20 mixed-state sessions pass and were inspected.

Production artwork decoder retains 1,074,176 bytes instead of 16,580,128 bytes. Controlled same-assets separate-process probe physical footprint: 22,594,256 to 10,666,656 bytes. Icon cache has an advisory 2 MiB cost budget and requests the closest 64-pixel representation. RESOURCE_FOOTPRINT.md and scripts/measure-artwork.swift reproduce the measurement. This is a component result, not 10x whole-app proof.

All 149 Swift package tests pass. An existing copied-sleep fixture exited with SIGKILL before review in combined UI runs; launching the installed system binary as an exact owned child fixes the fixture without changing process-control policy. Design workflow check and diff whitespace check pass. Native UI provider failed twice with Sky Computer Use native pipe startup failed. No installed app was changed.

Remaining native acceptance

  • Inspect live hook/session behavior and fullscreen transition when the native UI provider is available.
  • Measure the complete Release app against the installed build under identical workloads; the 10x GUI target remains unverified.

Keep open for the two remaining native acceptance items; release was subsequently authorized and published below.

Approved memory-efficiency follow-up — 2026-10-02

Preserve the existing native UI and session attribution. Visible dashboard, wall or menu surfaces use the current adaptive polling. With all surfaces hidden/minimized/occluded, inventory refreshes every 30 seconds without socket enumeration or resource-history accumulation. Hook notifications and exact-identity exit checks remain active. Reopening a surface schedules an immediate fresh snapshot and resets rate/history continuity. Full scans and explicit refreshes retain existing behavior; no new production dependency.

Acceptance scenarios

  • Hiding one of multiple windows does not put the other visible window into background mode.
  • Background samples report socket evidence unavailable, rather than retaining stale ports or reporting a false zero count.
  • Reopening restores sockets immediately and begins a new rate window; no hidden period becomes a growth trend.
  • Early/shared-host hooks and confirmed exits preserve existing attribution behavior in background mode.

Follow-up tasks

  • Track actual surface visibility and reduce background collection/retention.
  • Verify socket opt-out and immediate restoration with a real local listener.
  • Verify multiple-surface transitions, measurement continuity and session hooks.
  • Build Release, run focused checks, and record a reproducible native-render memory comparison with explicit scope limits.

Memory-efficiency follow-up validation

Actual window/popover occlusion, minimization and detachment drive independent surface tokens. Last surface hidden: 30-second socket-free inventory, no resource history, icon-cache eviction. Foreground: fresh full snapshot with rate continuity reset. Native-identity verified pending hooks wake the census through the existing two-second presence loop. Full socket scans reuse one buffer across PIDs.

35 focused checks and the full ordinary package suite pass (155 tests, one additional opt-in measurement test skipped). The opt-in Release probe passes in three alternating baseline/candidate pairs. Baseline HEAD 5cb28c0 vs local candidate median rendered-page resident memory 121.45 -> 116.44 MiB (4.1%); physical footprint 63.09 -> 62.13 MiB (1.5%). This is an offscreen XCTest/product-view fixture, not complete-app proof. It does not support the 10x target. RESOURCE_FOOTPRINT.md and scripts/measure-native-pages.py explain reproduction and limits.

Shared MCP unit checks and Release protocol verification pass with all eight tools/four engines; initial RSS 9.3 MiB, maximum request-time sample 34.6 MiB. Native UI provider still fails at startup, so the two original live/native acceptance items remain open. No installation, commit, push or release performed.

Verified public release — 2026-10-02

Owner authorized verification and release. Published v0.2.16 build21 from 439d06490d3e135942d4decc62fb96c9ddca0ced; protected release run succeeded. Stable-toolchain CI passes all ordinary tests (155, plus one skipped opt-in probe).

Independent public download: 8,781,025 bytes, SHA-256 f1ff1f8a59499220a102d2eebcb4182ee61de55b13d4365568afcd0894766098. Public Sparkle feed matches the release asset and advertises build21. DMG and mounted app pass Gatekeeper as Notarized Developer ID; staple and deep/strict code signature validate. Executable contains arm64 and x86_64. Repo launch smoke passes against the downloaded app. Receipts are retained in ignored artifacts/releases/v0.2.16-21/.

Installed build20 was preserved. Native UI provider still fails at startup, so live hook/fullscreen transitions remain unverified. Keep this issue open for the two native acceptance items above.

For the larger RAM reduction, the remaining blocker is attribution: the old whole-app process had 161.8 MiB physical footprint, 101.0 MiB RSS and 307.2 MiB historical peak. Heap inspection works, but allocation stacks require a fresh process with stack logging and a reproducible warm GUI workload. Image/renderer caches are candidates; the existing component and offscreen page measurements do not prove a whole-app 10x result or a hard platform floor.

Activity

  1. sarthakagrawal927 commented on Oct 8, 2026

    @sarthakagrawal927
    MemberAuthor

    Thread closeout / resume checkpoint — 8 October 2026

    Keep #15 open for its two native acceptance items. Source repairs and release evidence are complete within their stated scope; neither component image arithmetic nor offscreen XCTest probes establishes a 10x whole-app improvement.

    • Tested source checkout fa5465318b07f5a40d3cab46ecf28acbd93f415c; fetched main 811084cf9306bf9e8036303a3176649c29954063. Sources/package inputs match main. 170 native tests pass, one opt-in resource test is skipped, and universal Release build passes (macOS 14 minimum).
    • Installed metadata observed: 0.2.16/build 21. Existing public 0.2.17/build 22 was separately downloaded and verified against manifest size/hash, DMG integrity and Gatekeeper. New unsigned review source is not a newly qualified production release.
    • Historical installed nine-tile fullscreen fit/restoration at one viewport is retained. Controlled real hook/session lifecycle and matched complete-app memory are still UNKNOWN: 0/2 remaining native requirements qualified.
    • Three-app ownership changes are currently documentation-only local work. Agent Inbox owns lifecycle/status, segmented agent battery, attention, replies and per-request permissions; ContextDaddy owns context/policy/consumption/run telemetry. Preserve PerformanceDaddy's wall/menu/battery/hooks until Inbox proves replacement parity. Device battery/power and measured process attribution stay here.

    Remaining checklist:

    • Qualify real controlled hook/session identity and lifecycle in the installed/reviewed app, including shared hosts, pending hooks, missing snapshots, exit/PID reuse and fullscreen transitions. Do not modify provider configuration or infer a reply channel from a hook.
    • Measure the complete Release baseline and candidate with matched device, sessions/input, warm-up, duration, visible/background states and instrumentation. Record comparable RSS/physical footprint and limitations; do not compare different workloads or count one snapshot as improvement.
    • Reconcile the prepared ownership docs and Inbox migration only after exact-source checks and live replacement parity; source tests alone do not authorize removing compatibility surfaces.

    Current blocker: Sky Computer Use native pipe startup failed on inventory and direct-app calls; session reset did not restore access. Future work starts by restoring the native connection and locating the exact controlled candidate without replacing/terminating the owner's existing apps. Source receipts, review apps, published-artifact receipts and measurement scripts are retained in the private handoff. No new production release or installation was performed in this continuation.

    Related replacement/release tasks: Agent Inbox #1, ContextDaddy #21.

  2. sarthakagrawal927 commented on Oct 8, 2026

    @sarthakagrawal927
    MemberAuthor

    Status check, 9 October 2026: still open, needs native UI access

    Re-checked today. main is at 302077f with a clean checkout, and the source repairs and v0.2.16/v0.2.17 release evidence from earlier comments stand. The open items still need things this agent session doesn't have:

    • live hook/session lifecycle and fullscreen-transition qualification in the installed app, which needs native UI control (Computer Use / XcodeBuildMCP UI) without replacing or terminating the owner's running app;
    • a matched complete-Release memory comparison (same device, sessions, warm-up and visibility states). It must run a second GUI instance alongside the owner's installed one, which needs the owner's go-ahead because it can collide with the live hook socket;
    • reconciling the ownership docs and Inbox migration, which waits on Agent Inbox replacement parity (Finish local Agent Inbox native qualification and release handoff sarthakagrawal927/agentbox#1).

    What the owner needs to do: run these with a session that has working native UI control, or do the hook/fullscreen check by hand and record the result here. No code is pending from this lane.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions