This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Keying | Human-readable project path slug **plus** the real path stored inside each file | A renamed folder degrades to "listed under old name", never to "lost" |
| Index | `index.json` per project, **rebuildable by scanning** | An index may cache, it must never be load-bearing (anti-Copilot #vscdb-corruption) |
| What gets summarized | **Nothing at rest.** Transcripts are stored verbatim | Disk is free; tokens are not. Summarizing to store pays money to lose information |
| Where summarization IS used | (a) resume when the transcript exceeds the context budget — reuse `compactAgentMemory`; (b) async title generation | The user's instinct ("summarize with an LLM") lands here, not in storage |
| Privacy | Local files only; never uploaded | The BYOK promise; M9 sync may later offer opt-in encrypted sync of this same format |
## 4. Data model
```
~/.levelcode/sessions/
<project-slug>/ e.g. -Users-ada-code-thin-ly (path, slashes → dashes)
- Resume-tier unit tests with a fake tokenizer: boundary math at exactly `B`,
compact-event incremental path, tool-pair integrity across the cut (reuses the
existing boundary-picking function — test it directly).
- Manual matrix in EXIT-TEST.md: crash, reload, rename-folder, two-window, BYOK vs
gateway title/compact costs surfaced correctly.
## 10. Risks, honestly
- **Transcripts contain code.** They already transit the model; at rest they are
plain files in the user's home directory, same trust class as the code itself.
Anything that later *shares* a session (LevelLinks) must scrub — that is that
feature's burden, recorded here so it is not forgotten.
- **Compact-on-resume costs money** and briefings lose nuance. Mitigations: verbatim
tier preferred, explicit confirmation over the threshold, full transcript always
kept, briefing visibly marked in the chat.
- **Two windows, one project** is the only real concurrency surface; the lockfile +
read-only fallback keeps it boring.
- **Index drift** is a solved non-risk by construction: scanning is the source of
truth, the index is a cache.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
docs: chat sessions design (save every chat, resume any chat) #60
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
docs: chat sessions design (save every chat, resume any chat) #60
Filter by extension
Viewed files
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing