mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 06:10:21 +00:00
Heartbeat: add isolatedSession option for fresh session per heartbeat run (#46634)
Reuses the cron isolated session pattern (resolveCronSession with forceNew) to give each heartbeat a fresh session with no prior conversation history. Reduces per-heartbeat token cost from ~100K to ~2-5K tokens. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -253,6 +253,13 @@ export type AgentDefaultsConfig = {
|
||||
* Lightweight mode keeps only HEARTBEAT.md from workspace bootstrap files.
|
||||
*/
|
||||
lightContext?: boolean;
|
||||
/**
|
||||
* If true, run heartbeat turns in an isolated session with no prior
|
||||
* conversation history. The heartbeat only sees its bootstrap context
|
||||
* (HEARTBEAT.md when lightContext is also enabled). Dramatically reduces
|
||||
* per-heartbeat token cost by avoiding the full session transcript.
|
||||
*/
|
||||
isolatedSession?: boolean;
|
||||
/**
|
||||
* When enabled, deliver the model's reasoning payload for heartbeat runs (when available)
|
||||
* as a separate message prefixed with `Reasoning:` (same as `/reasoning on`).
|
||||
|
||||
Reference in New Issue
Block a user