Skip to content

agents.defaults.compaction.model appears unused / dead config in runtime #59863

Description

@truiem-bot

Summary

OpenClaw exposes agents.defaults.compaction.model in the runtime schema/config surface, but in the installed runtime build I tested, I could not find any active code path that consumes it for session compaction.

Observed behavior

  • Config includes:
    • agents.defaults.compaction.model
  • Runtime schema/help includes:
    • agents.defaults.compaction.model
  • But runtime search only found references in:
    • runtime-schema-B34T_6nr.js
  • I could not find any execution path that reads the configured value and uses it to select a compaction model.

Evidence

  1. Searching the installed runtime under:
    • /usr/local/lib/node_modules/openclaw/dist/**/*.js
  2. Only hit for compaction.model was schema metadata:
    • runtime-schema-B34T_6nr.js
  3. Budget-triggered compaction path appears to pass the session's active model instead:
    • compactEmbeddedPiSession({ ... model: params.followupRun.run.model, trigger: "budget", ... })
  4. Memory-flush path is separate and also does not appear to read agents.defaults.compaction.model

Expected behavior

One of these should be true:

  1. agents.defaults.compaction.model is actually honored for compaction runs, or
  2. the config key is removed from schema/docs if it is no longer supported

Why this matters

This is misleading for operators. A config like:

"compaction": {
  "mode": "safeguard",
  "model": "openai-codex/gpt-5.3-codex-spark"
}

strongly implies compaction will use that model, but runtime behavior suggests it does not.

Impact

  • makes compaction behavior hard to reason about
  • can lead to false assumptions during context-budget tuning
  • especially confusing when debugging large-session compaction/model limits

Suggested fix

  • wire agents.defaults.compaction.model into the actual compaction executor, or
  • remove/deprecate the config key and update schema/docs accordingly

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions