Skip to content

Comments

docs(compaction): clarify valid modes and fix self-referential link#10466

Open
chelixbot wants to merge 1 commit intoopenclaw:mainfrom
chelixbot:fix/compaction-docs-clarify-modes
Open

docs(compaction): clarify valid modes and fix self-referential link#10466
chelixbot wants to merge 1 commit intoopenclaw:mainfrom
chelixbot:fix/compaction-docs-clarify-modes

Conversation

@chelixbot
Copy link

@chelixbot chelixbot commented Feb 6, 2026

Summary

Clarifies the compaction.mode configuration by:

  1. Adding a "Compaction modes" section documenting the valid values (default, safeguard) with descriptions
  2. Fixing a self-referential link in the Configuration section that pointed to /concepts/compaction (itself) instead of the gateway configuration page

Changes

  • New table documenting valid modes and their behavior
  • Updated link to point to /gateway/configuration with anchor to the compaction section

Addresses

Closes #10395 (compaction.mode documentation unclear)

Testing

  • Verified link target exists in docs/gateway/configuration.md
  • Confirmed valid modes match zod schema (z.literal("default"), z.literal("safeguard"))

🤖 AI-assisted (Claude via OpenClaw). Lightly tested — docs change only.

Greptile Overview

Greptile Summary

  • Updates docs/concepts/compaction.md to clarify what compaction is and that it persists in JSONL history.
  • Adds a new “Compaction modes” section documenting valid agents.defaults.compaction.mode values (default, safeguard).
  • Replaces a self-referential link with a link intended to jump to the relevant section in the Gateway configuration docs.

Confidence Score: 4/5

  • Mostly safe to merge, but contains a broken intra-doc anchor link that should be fixed to avoid confusing users.
  • Docs-only change with straightforward content updates; the only concrete issue found is the configuration link fragment not matching any anchor in the target page, which will break navigation.
  • docs/concepts/compaction.md (link fragment)

(2/5) Greptile learns from your feedback when you react with thumbs up/down!

- Add 'Compaction modes' section documenting valid modes (default, safeguard)
- Fix Configuration section link that pointed to itself
- Link now points to gateway/configuration with anchor

Addresses openclaw#10395
@openclaw-barnacle openclaw-barnacle bot added the docs Improvements or additions to documentation label Feb 6, 2026
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

## Configuration

See [Compaction config & modes](/concepts/compaction) for the `agents.defaults.compaction` settings.
See [Gateway configuration](/gateway/configuration#agentsdefaultscompaction-reserve-headroom--memory-flush) for the full `agents.defaults.compaction` settings, including `reserveTokensFloor` and `memoryFlush` options.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Broken docs anchor link

The new link target (/gateway/configuration#agentsdefaultscompaction-reserve-headroom--memory-flush) doesn't match the actual heading anchor in docs/gateway/configuration.md (the heading is #### agents.defaults.compaction (reserve headroom + memory flush)), and the grep check shows no agentsdefaultscompaction anchor text in that file. As written, this will 404/scroll to the wrong place in Mintlify. Please update the fragment to the real slug for that heading (or link to the section without a fragment).

Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/concepts/compaction.md
Line: 35:35

Comment:
**Broken docs anchor link**

The new link target `(/gateway/configuration#agentsdefaultscompaction-reserve-headroom--memory-flush)` doesn't match the actual heading anchor in `docs/gateway/configuration.md` (the heading is `#### agents.defaults.compaction (reserve headroom + memory flush)`), and the grep check shows no `agentsdefaultscompaction` anchor text in that file. As written, this will 404/scroll to the wrong place in Mintlify. Please update the fragment to the real slug for that heading (or link to the section without a fragment).

How can I resolve this? If you propose a fix, please make it concise.

@openclaw-barnacle
Copy link

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle bot added the stale Marked as stale due to inactivity label Feb 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation stale Marked as stale due to inactivity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Docs] compaction.mode "auto" vs "safeguard" - clarify deprecation status

1 participant