34 34 | Hook | Behavior |
36 -| `session_before_compact` | Returns prune compaction when `prune.overrideDefault` is true. Includes `firstKeptEntryId`, `tokensBefore`, and details `{ kind: "prune", version: 1, sourceEntriesProcessed, tailKept }`. |
36 +| `session_before_compact` | Returns prune compaction when `prune.overrideDefault` is true. Hard-caps raw kept tail at ~32k tokens when a safe boundary exists. Includes `firstKeptEntryId`, `tokensBefore`, and details `{ kind: "prune", version: 1, sourceEntriesProcessed, tailKept, splitPrefixMessages }`. |
37 37 | `session_start` | Enables/disables `prune_recall` from current branch state. |
38 38 | `session_tree` | Enables/disables `prune_recall` from current branch state. |
39 39 | `session_compact` | Enables `prune_recall` after a prune compaction, logs in debug mode, and notifies UI when present. |
44 44 | --- | ---: | --- |
45 45 | `prune.overrideDefault` | `true` | Return prune compaction from `session_before_compact`. |
46 46 | `prune.sectionLimit` | `8` | Max lines per structured section in formatted output. |
47 -| `prune.transcriptLimit` | `120` | Max transcript lines kept in summary tail. |
48 -| `prune.toolCapPerTurn` | `8` | Loaded setting; not currently applied by source. |
47 +| `prune.transcriptLimit` | `60` | Max transcript lines kept in summary tail. |
48 +| `prune.toolCapPerTurn` | `8` | Max tool-call transcript lines per user turn. Errors are always kept. |
49 49 | `prune.debug` | `false` | Log prune stats, skipped roles, and compaction status. |
60 60 - `[Files And Changes]`: paths inferred from read/write/edit tool args and simple bash path matches.
61 61 - `[Outstanding Context]`: tool errors and recent blocker/failure lines.
62 62 - `[User Preferences]`: explicit user preference lines.
63 + - `[Continue Now]`: deterministic resume block from the transcript tail.
63 64 - Empty structured sections are omitted.
64 65 - Transcript entries keep stable `#N` source refs from the compaction input order.
65 66 - Tool calls render as `* tool "arg" (#N)` when a command/path is available, otherwise `* tool (#N)`.
66 67 - Bash tool commands are shortened: leading `cd ... &&` is removed, and a trailing simple pipe such as `tail`/`head` is removed.
67 68 - Tool errors render as `[tool_error] [ERROR] tool (#N)`.
68 -- Existing prune summaries are merged with fresh summaries. Goals/preferences/files are deduped, context is refreshed, transcript keeps previous entries before fresh entries.
69 +- Existing prune summaries are merged with fresh summaries. Goals/preferences/files are deduped, context and continue block are refreshed, transcript keeps previous entries before fresh entries.
69 70 - Prune compactions are detected by `details.kind === "prune"`; older hook summaries are also detected when they contain the prune recall note.
70 71 - Recall searches current branch lineage by default. `scope: "all"` searches all session entries.
71 72 - Recall includes message entries, compaction summaries, and `custom_message` content.
88 89 [Outstanding Context]
89 90 - lint still failing
93 +- Current request: Fix the auth bug (#1)
94 +- Last action: read src/auth/session.ts (#3)
95 +- Next: continue current request; use prune_recall before redoing old work.
99 -prune: 10 source entries processed; tail kept 3 (~18.9k tok)
105 +prune: 10 entries summarized; before 18.9k tok; raw kept 3 entries; split-prefix 0