Repository navigation
Description
Follow-up to #19.
Since 0.3.4 the summary has a bounded number of entries, but nothing limits how long a single entry is. On one of my projects (eight weeks old, 226 issues, 2.8k events) summary.md is 50.6 KB, roughly 12.6k tokens. The guidance says "a few hundred to ~1,500", and the file gets loaded at the start of every session.
Where it comes from:
| Section | Size |
|---|---|
| Open issues (14) and their failed/partial attempts | 26.0 KB |
| 10 newest fixed issues | 9.4 KB |
| Decisions (15) | 9.0 KB |
| Notes (10) | 5.5 KB |
Two things stand out:
-
Fixed issues carry their whole fix. An entry looks like this:
- [DONE] #0031 Timeline jumps to the top after a reload [web/timeline.tsx] -> Restored the scroll anchor after the virtual list measured its rows; the layout effect ran before the rows had a height, so the offset came from estimates. Added a test that reloads at row 400 and checks the anchor stays within 4 px. [web/use-anchor.ts] (fixed) - Failed attempt: window.scrollTo(savedY) on mount, the list re-measured and moved it back [web/timeline.tsx]Once an issue is closed, the next session mostly needs to know it existed. The details are one
get_issuecall away. -
Long records are printed verbatim. Agents like to put a whole investigation into one
record_attempt. In that project 90 of 150 attempts are over 300 characters and 11 are over 1 KB, and every open issue shows up to three of them.
What I'd suggest:
-
Render a fixed issue as a single line:
- [DONE] #0031 Timeline jumps to the top after a reload [web/timeline.tsx] (fixed) -
Clip every record text in the summary to around 300 characters at a word boundary, but never the
[location]:- [OPEN] #0042 CSV export times out for accounts with more than 50k rows: measured 41 s on the staging copy against a 30 s gateway limit, the query plan shows a sequential scan on orders.created_at because the composite index starts with tenant_id, and the retry in the client doubles the load on every timeout... [api/export.py] (open)
Nothing in events.jsonl or issues/ would change. I tried both against the same event log, and the summary went from 50.6 KB to 23.0 KB (about 5.8k tokens) with the existing tests still passing.
Open questions:
- Is 300 a sensible default, or should it be a
config.tomlsetting? - Should the guidance also ask agents for shorter records (for example an issue title under 140 characters, as the
log_issuedocstring already hints), so the summary stays small without relying on clipping? - Open-issue attempts are the rest of the size. I'd keep them, since they stop repeated dead ends, but maybe 2 instead of 3 per issue?
Activity
bigfree commentedon Oct 20, 2026
The branch is here if you want to look at it: https://github.com/bigfree/projectmem/tree/summary-compact-entries
Diff against main: main...bigfree:projectmem:summary-compact-entries
It's one commit touching
summary.pyandtests/test_summary.py. I added three tests, andtest_summary_and_issue_file_are_regeneratednow looks for the fix text in the issue file instead of the summary. The full suite passes (359). I can open it as a PR whenever you like, or change it once the open questions above are settled.riponcm commentedon Oct 28, 2026
Thanks, this is a fair catch. 0.3.4 capped how many entries the summary shows, but not how long each one is, and my measurement used short synthetic entries, so it missed exactly this. Yes, please open the PR from your branch. On your questions:
config.tomlsetting only if someone needs it.get_issuecall away.Planned for 0.3.5.
bigfree commentedon Oct 29, 2026
Opened #30. It's rebased on current
mainand follows what you wrote:RECORD_CHARS, next toTITLE_CHARS(140) instorage.py.AI_INSTRUCTIONS.md. The same limits are also in thesummarydescription of the write tools, for clients that never callget_instructions.Two things to look at before merging:
INSTRUCTIONS_VERSION2, sopjm initwill replace older instruction files and keep a.bak.get_summaryand the instructions is updated. The README table still has it.On the same project the summary is now 22.2 KB, down from 47.2 KB on
main.Thanks!