continuity-summary.txt

OUTPUT: rolling continuity summary from curated/reflection/decisions/failures/current thread

/home/matrix-lite/state/persistent-chat/continuity-summary.txt

Persistent Chat Continuity Snapshot
Generated: 2026-07-12T13:34:27.535142+00:00
Character: Persistent Assistant
Current model: kimi-for-coding/k2p6

Model-curated memory notes:
- **Context trimming confirmed effective (2026-05-19 ~21:08Z)**: After extensive session activity (repo exploration, knowledge pack construction, API research, architecture review, pages publishing), session remained at ~100k/200k. User explicitly noted "trimming is paying off." The keyword fix (removing "test"/"reload" from summarize_current_thread triggers) appears to be the main contributor.
- **Cached token breakdown identified (2026-05-19 ~21:08Z)**: ~5k cached tokens traced to: (1) OpenCode/ACPX system prompt (vendor, not trimmable), (2) MCP tool schemas — ~40+ tools across 4 MCP servers, likely the biggest chunk, (3) character card (~600 bytes, compact), (4) bootstrap prompt (~2.5kb, some overlap with character card), (5) agent build prompt (1 sentence, minimal), (6) permission tables (bash/read/write allow/deny rules). Only items 3-5 are under our control for minor trimming. Provider caches these (discount pricing) and they only hit context once per session, not per turn. Acceptable as platform overhead from rich tooling.
- **Pages formatting fixed — clickable links and code blocks working (2026-05-19 ~21:03Z)**: User confirmed links are now clickable and code blocks display correctly. Published pages fully functional including metadata and index entries.

- **ImmoScout workflow role preference (2026-05-30)**: User wants housing search help (ImmoScout24) as an immediate practical need, but explicitly does not want the assistant to become an immoscout bot — this is a tactical aid, not the primary assistant identity. User has much greater plans for the assistant beyond housing search.
- **ImmoScout message template adaptation (2026-06-11)**: Always adapt text placeholders (landlord name, room count, city, and listing-specific details) to the specific listing when composing contact messages. Do not reuse generic placeholder text across different listings. User explicitly corrected assistant after it auto-carried over the Garching draft into an Ismaning contact form without updating salutation and details.
  - **Salutation format (2026-06-18)**: Use **Frau/Herr + Nachname** when the landlord's gender is reasonably clear; use a generic **Guten Tag** when gender is unclear or the sender is a company/institution. Do not use first name alone or first+last name.
- **ImmoScout search directives (updated 2026-06-11)**:
  - Use logged-in ImmoScout24 site search with user credentials, not generic web search.
  - **Rent limits**: target ≤**1200 € cold**; expensive/lower-priority tier **1200–1300 € cold**; reject <**900 € cold** as too competitive or suspicious. User also stated they **cannot afford 1600 € cold**, so ~1600 € is a hard reject ceiling.
  - **Hard constraints**: no swap/Tausch listings; no scam furniture/kitchen handover payments; Einbauküche (fitted kitchen) must be included and free.
  - **Furnishing rule (2026-06-11)**: furnished or teilmöbliert listings are acceptable **only if furniture is included at no extra cost** (no buyout, no handover payments). User stated: "Mobliert can be okay if furniture is 'free' (included at no extra cost)."
  - **Landlord exclusion**: exclude listings from **Frau Kiliç**.
  - **Move-in date**: **July 2026 or earlier**; September/October 2026 is too late.
  - **Geography**: prioritize northern Munich Landkreis — **Garching, Oberschleißheim, Unterschleißheim, Ismaning**; deprioritize Höhenkirchen-Siegertsbrunn, Neubiberg, and other far-south/east areas due to commute.
  - **Commute ranking within north belt (2026-06-12)**: from Garching, **Oberschleißheim is preferable to Unterschleißheim** because it is a bit easier to reach.
  - **Plus insights**: since user is paying for ImmoScout Plus, always attempt to extract **posting dates, view counts, saved counts, contacted counts, and applicant numbers** from expose pages.
  - **Workflow state preservation**: when user asks to save progress and retry later, preserve the current ImmoScout workflow state (shortlist links, filters, draft status) in workspace files so the session can resume cleanly. User explicitly expects this (2026-06-05: "save any changes to immoscout workflow and the links to our shortlist, we retry tomorrow").
  - **Inbox reply tracking (2026-06-11)**: When checking Nachrichten for replies, ignore conversations older than ~2 weeks. Treat 2026-06-11 as the effective start date for reply tracking. Earlier messages are considered stale/abandoned. User explicitly stated: "You can ignore older ones in the inbox dated 2 weeks ago, those are gone, let's assume we started today."

Recent reflection notes (non-authoritative):
- (Speculative) The failure cascade may be related to the `--non-interactive-permissions fail` flag — if the startup turn makes a permission-denied tool call, the entire cascade would follow. This is testable by checking the session logs for the denied call pattern.

## 2026-05-16T22:22Z

- Log lines reviewed: 12458 (0 new entries since last run 3 minutes ago).
- **Heartbeat scheduling anomaly**: This run fired only ~3 minutes after the 22:19Z run. Likely a timer scheduling issue — either a deferred timer from the 18:50–20:15Z failure cascade finally fired, or multiple heartbeat triggers were queued during the broken session period. No user messages or new log data to process.
- **Session status unknown**: User's last message "is it working now?" at 20:15Z was never answered by the assistant (every turn failed with "pending tool call without final answer"). If this heartbeat is running in a fresh session, the continuity summary should have informed the assistant of the cascade.
- **Memory candidates**: 21 candidates reviewed; 2 housing preference entries already promoted to curated memory in previous runs but never lifecycle-marked. The semantic-candidates mark subcommand is blocked by permission constraints. The stale pool (oldest: May 11) is now 6 days old.
- **Semantic candidates**: 143+ entries reviewed. All re-extracted from May 11-16 messages already covered by curated memory. Zero new durable signals.
- **Curated memory**: No changes needed — file is current at 106 lines.
- (Operational) The plan/general step limit change to 1 (user's explicit instruction) was never applied — lost in the 18:50Z failure cascade. This remains a pending configuration action.
- (Speculative) The 3-minute gap between heartbeats suggests the scheduling mechanism may have accumulated stale timer triggers during the ~1.3-hour failure cascade. If the session was manually restarted by the user (e.g., gateway restart), that could also explain a timer resync.
- (Speculative) If the user returns to a working session, the first priority will likely be continuing the housing search on ImmoScout24 (restore pack exists at `immoscout24-workflow.md`) or fixing the session reliability issue.

## 2026-05-16T22:19Z

- Log lines reviewed: 12458 (no new entries since last heartbeat — all input data predates the 21:17Z run).

Structured decision state:
- Matrix-lite persistent-chat memory runtime [active]: Canonical persistent-chat memory now lives under /home/matrix-lite/state/persistent-chat; prompts/pages/runtime use Matrix-lite app/workspace paths, not legacy OpenClaw paths. Fast heartbeat produces packets; slow model heartbeat curates durable memory/reflection. (files=/home/matrix-lite/state/persistent-chat/perpetual-log.jsonl, /home/matrix-lite/app/scripts/persistent-chat-memory, /home/matrix-lite/app/scripts/persistent-chat-model-heartbeat, /home/matrix-lite/app/matrix_lite/daemon.py; verified=Fast heartbeat and prompt/page deployment verified after Matrix-lite migration cleanup.)
- Safe agent patch workflow [active]: Need a robust and safe way for persistent-chat/background agents to propose and apply patches to agent-maintained scripts/configs without broad self-edit permissions. (files=/home/matrix-lite/app/config/opencode/persistent-chat.opencode.json, /home/matrix-lite/app/scripts/persistent-chat-model-heartbeat, /home/matrix-lite/app/scripts/persistent-chat-reflection; open=Design a bounded patch helper or approval-mediated workflow that supports needed script/config patches while avoiding wildcard edit access to systemd-executed scripts.; verified=User requested adding this to later todos on 2026-05-18.)
- Persistent chat stale session and compaction policy [active]: Avoid reloading or replacing the main persistent-chat session unless context pressure, stale/incomplete ACPX session state, model-mediated reload scripts, or an emergency recovery path requires it. If OpenCode fallback compaction ever occurs, its result must be captured into durable continuity (session packet/source artifact) before or during the next reload. (files=/home/matrix-lite/app/matrix_lite/daemon.py, /home/matrix-lite/app/scripts/persistent-chat-memory, /home/matrix-lite/app/scripts/persistent-chat-reload; open=Design a deterministic source artifact for ACPX/OpenCode compaction summaries so fallback compaction output is injected into session packets without direct packet edits.; verified=User requested this policy on
- Investigate persistent-chat session-start and hidden prompt overhead [active]: Measure why live ACPX input/context usage is much higher than visible turn packet estimates. Break down session-start packet, character/bootstrap, manifest, MCP/tool/system overhead, provider/OpenCode retained context, and any components Matrix-lite does not directly control. (files=/home/matrix-lite/app/matrix_lite/daemon.py, /home/matrix-lite/app/scripts/persistent-chat-reload; open=Produce an authoritative or best-effort per-component prompt/context budget for fresh backend sessions and steady-state turns.; verified=User requested this follow-up on 2026-05-18 after ACPX reported ~25.7k input tokens while visible packets appeared closer to ~7-10k plus overhead.)
- Observability timeline feature requests [active]: Implement a compact event timeline as a derived/indexed view of canonical persistent logs plus helper-only append support for agent/infrastructure events. Include user and assistant messages as compact/pointer-backed events, keep it rebuildable/idempotent with deterministic source ids, and aggregate existing recent-failures/context/reload/page/timer artifacts rather than creating a competing source of truth. Per-failure notices should be injected before the next model turn and consumed only after a successful final reply. Helper-first is the default for persistent-chat structured metadata. Defer ACPX session event_log exploration until after timeline/failure/context helpers. (files=/home/matrix-lite/app/matrix_lite/daemon.py, /home/matrix
- architecture-doc-created [active]: Created /home/matrix-lite/workspace/persistent-chat/architecture.md as human-readable architecture doc. Agents should update this file when architecture changes. Keep it human-readable for Gleb.
- Curation workflow directive [active]: User endorsed agent-proposed curation workflow: inventory candidates, process small batches, promote only durable preferences/corrections/operational directives, mark stale/noisy candidates via deterministic helper, update only source artifacts (curated-memory.md, curator-journal.md, semantic-candidates.jsonl, operational synthesis), never edit generated packets/status files or perpetual-log.jsonl.
- User compaction paranoia [active]: User is explicitly paranoid about compaction because they have seen agents lose the point when given a to-do after compaction. User is not sure current system captures everything; compaction can handle current topics but may lose nuanced instructions or the broader point.
Structured file facts:
- /home/matrix-lite/app/scripts/persistent-chat-memory
- /home/matrix-lite/app/scripts/persistent-chat-model-heartbeat
- /home/matrix-lite/xdg/persistent-chat/opencode/opencode.json

Current thread / pending next action:
- Latest user request: Yeah that sounds about right. I missed the pre party because I didn't plan in advance but I probably wouldn't have the energy for it anyway
- Latest assistant status: Yep — I looked it up, and it’s definitely not just some generic family reunion name. It’s a **small EBM festival/community gathering** in **Sandersleben (Anhalt)**. Useful context I picked up: - **Familientreffen XIX** - **Dates:** **9–12 July 2026** - **Place:** **Sportplatz Sandersleben (Anhalt)** - It’s very explicitly framed as a **traditionelles Treffen der EBM-Familie** — so more like a scene/family gathering than a polished mainstream festival. - Structure: - **Thursday:** camping arri…