Make compaction visible and resume final replies

When an automatic compaction happens mid-turn, chat users currently see a long stall and the run can finish without a final visible answer.

This adds an optional bundled compaction notifier hook and a one-shot compacted-transcript continuation retry when a compaction produced no user-visible final payload.
This commit is contained in:
simplyclever914
2026-05-03 14:51:03 +03:00
committed by Peter Steinberger
parent d0f0fe97a6
commit e84ceb47f6
4 changed files with 82 additions and 4 deletions

View File

@@ -162,10 +162,11 @@ Npm specs are registry-only (package name + optional exact version or dist-tag).
| Hook | Events | What it does |
| --------------------- | ------------------------------ | ----------------------------------------------------- |
| session-memory | `command:new`, `command:reset` | Saves session context to `<workspace>/memory/` |
| bootstrap-extra-files | `agent:bootstrap` | Injects additional bootstrap files from glob patterns |
| command-logger | `command` | Logs all commands to `~/.openclaw/logs/commands.log` |
| boot-md | `gateway:startup` | Runs `BOOT.md` when the gateway starts |
| session-memory | `command:new`, `command:reset` | Saves session context to `<workspace>/memory/` |
| bootstrap-extra-files | `agent:bootstrap` | Injects additional bootstrap files from glob patterns |
| command-logger | `command` | Logs all commands to `~/.openclaw/logs/commands.log` |
| compaction-notifier | `session:compact:before`, `session:compact:after` | Sends visible chat notices when session compaction starts/ends |
| boot-md | `gateway:startup` | Runs `BOOT.md` when the gateway starts |
Enable any bundled hook:
@@ -206,6 +207,12 @@ Paths resolve relative to workspace. Only recognized bootstrap basenames are loa
Logs every slash command to `~/.openclaw/logs/commands.log`.
<a id="compaction-notifier"></a>
### compaction-notifier details
Sends short status messages into the current conversation when OpenClaw starts and finishes compacting the session transcript. This makes long turns less confusing on chat surfaces because the user can see that the assistant is summarizing context and will continue after compaction.
<a id="boot-md"></a>
### boot-md details