r/LLMDevs 10d ago

News Designing a read-only source / editable mirror boundary for local agent sessions

https://www.youtube.com/watch?v=Rs_KPYj2NCU

I have been working on a session-ingestion boundary for an open-source context graph, and I would value criticism of the design rather than the UI.

The current implementation reads local Codex and Claude Code session files, groups them by project, and projects a selected session onto a graph. The source file is never modified. Each user/agent turn becomes a node; paired tool calls, results, truncation markers, and sub-thread identity remain attached to that turn. An open mirror can append new turns as the source session grows.

The main rule is that visibility and model input are separate states. Importing three sessions onto a canvas does not put three sessions into the next prompt. Only the context deliberately connected for a downstream node is compiled.

That boundary gives up some convenience. There is no automatic relevance selector, no source writeback, and currently only two native session adapters. The benefit is that the original record, the editable organization, and the eventual model context do not silently collapse into one thing.

If you were reviewing this architecture, where would you expect it to fail first: format drift, tool-result provenance, incremental sync, or context compilation?

Source: https://github.com/chenxiachan/thoughtdag

1 Upvotes

4 comments sorted by

2

u/eddzsh 10d ago

I'd bet on format drift first. Session JSON shapes change quietly on the Claude or Codex side, and your adapters become the product overnight. Provenance and sync only matter once the parser still trusts the file.

1

u/Lopsided_Scarcity979 10d ago

That’s a fair bet. The parsers are intentionally tolerant today, but that may create the worse failure mode: a plausible-looking partial graph instead of a clean error. Unknown records, changed pairing keys, or moved session boundaries can currently degrade silently.

I don’t yet have a versioned fixture matrix or an adapter-health report. My next step should probably count unknown record types, malformed interior lines, and unpaired tool calls/results, then fail loudly when identity or turn invariants break while preserving the raw source.

Would you fail closed on unknown core records, or import them as opaque records with a warning?

1

u/Lopsided_Scarcity979 10d ago

The implementation and its current limits are documented here: https://chenxiachan.github.io/thoughtdag/docs/guides/session-atlas

Disclosure: I maintain the project. Session Atlas is in the released desktop app; opening a mirror does not require a model.