Agentic System ยท Engineering notes

What survives a working session

A background worker reads eligible Claude and Codex sessions, extracts facts, results and procedures, and records how far it got. Curated notes and transcript excerpts have separate recovery paths.

A day in the memory system
  1. HourlyRead new workProcess eligible sessions after 30 minutes of inactivity.
  2. 11:55 p.m.Catch upCheck the same bookmarks again, including active sessions.
  3. 3:00 a.m.ConsolidateMerge eligible duplicates and retire eligible old tasks.

Schedule shown in workstation time.

Technology

  • Python
  • JSONL session readers
  • SQLite checkpoints
  • Embeddings
  • Scheduled maintenance

Capture what someone can reuse

Suppose a session fixes a report and explains how to reproduce the check. The extractor can record the repair as a task result and the check as a reusable procedure. It tags the extracted items with their source session. A procedure inferred from conversation stays eligible for revision and consolidation.

Where the watcher resumes

A watermark is a saved reading position for one session. SQLite tracks the last processed Claude message ID or Codex log line, a file fingerprint and the extraction status. If the fingerprint matches a completed or empty run, the watcher can skip extraction. If the log grows, it reads past the previous position. A total write failure retains the old position. A partial success can advance it while leaving some items unsaved.

What runs each day?

The hourly watcher waits for an eligible session to be idle for 30 minutes. The 11:55 p.m. backstop checks again without the idle requirement, using the same watermarks. At 3 a.m. workstation time, a separate consolidation job looks for nearly identical eligible notes, keeps one active record from each merged pair and rebuilds the keyword index. Curated rules, architecture records and decisions are protected from merging. Episodic tasks and to dos older than 90 days are marked inactive unless tagged pinned or canonical. Their stored rows remain available for inspection.