Skip to content

Agent runner: align compaction floor guidance#24059

Merged
Takhoffman merged 1 commit intomainfrom
fix/compaction-floor-message
Feb 23, 2026
Merged

Agent runner: align compaction floor guidance#24059
Takhoffman merged 1 commit intomainfrom
fix/compaction-floor-message

Conversation

@Takhoffman
Copy link
Contributor

@Takhoffman Takhoffman commented Feb 23, 2026

Summary

Describe the problem and fix in 2–5 bullets:

  • Problem: User-facing overflow recovery guidance suggested reserveTokensFloor >= 4000, while enforced default floor is 20000.
  • Why it matters: Guidance was inconsistent with actual runtime guardrails.
  • What changed: Updated both user-visible recovery messages to 20000.
  • What did NOT change (scope boundary): No behavioral changes to compaction/recovery logic itself.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

  • Closes #
  • Related #

User-visible / Behavior Changes

  • Overflow recovery messages now recommend agents.defaults.compaction.reserveTokensFloor of 20000 or higher.

Security Impact (required)

  • New permissions/capabilities? (Yes/No) No
  • Secrets/tokens handling changed? (Yes/No) No
  • New/changed network calls? (Yes/No) No
  • Command/tool execution surface changed? (Yes/No) No
  • Data access scope changed? (Yes/No) No
  • If any Yes, explain risk + mitigation:

Repro + Verification

Environment

  • OS: macOS
  • Runtime/container: Node 22 + pnpm
  • Model/provider: mocked embedded run path
  • Integration/channel (if any): reply runner
  • Relevant config (redacted): defaults

Steps

  1. Trigger overflow/compaction failure path in reply runner tests.
  2. Inspect user-facing recovery text.
  3. Confirm floor recommendation is 20000.

Expected

  • Message guidance matches enforced default floor.

Actual

  • Matches expected after fix.

Evidence

Attach at least one:

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

Human Verification (required)

What you personally verified (not just CI), and how:

  • Verified scenarios: pnpm test src/auto-reply/reply/agent-runner.runreplyagent.test.ts
  • Edge cases checked: both overflow error message variants updated.
  • What you did not verify: live user channel delivery text.

Compatibility / Migration

  • Backward compatible? (Yes/No) Yes
  • Config/env changes? (Yes/No) No
  • Migration needed? (Yes/No) No
  • If yes, exact upgrade steps:

Failure Recovery (if this breaks)

  • How to disable/revert this change quickly: revert commit 500c1b255.
  • Files/config to restore: src/auto-reply/reply/agent-runner-execution.ts.
  • Known bad symptoms reviewers should watch for: stale floor recommendation in recovery text.

Risks and Mitigations

List only real risks for this PR. Add/remove entries as needed. If none, write None.

  • Risk: None.
    • Mitigation: N/A.

Greptile Summary

Updated user-facing overflow recovery messages to recommend reserveTokensFloor of 20000 instead of 4000, aligning with the enforced default floor defined in src/agents/pi-settings.ts:3 (DEFAULT_PI_COMPACTION_RESERVE_TOKENS_FLOOR = 20_000).

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk.
  • Simple string literal updates that correct user-facing documentation to match enforced runtime defaults. No behavioral changes, no logic modifications, and the values are verified against the codebase constant.
  • No files require special attention.

Last reviewed commit: 500c1b2

@Takhoffman Takhoffman force-pushed the fix/compaction-floor-message branch from 500c1b2 to ffc8824 Compare February 23, 2026 02:13
@Takhoffman Takhoffman merged commit 5c9f972 into main Feb 23, 2026
7 checks passed
@Takhoffman Takhoffman deleted the fix/compaction-floor-message branch February 23, 2026 02:13
carlosrivera pushed a commit to myascendai/meshiclaw that referenced this pull request Feb 23, 2026
gabrielkoo pushed a commit to gabrielkoo/openclaw that referenced this pull request Feb 23, 2026
mreedr pushed a commit to mreedr/openclaw-custom that referenced this pull request Feb 24, 2026
brianleach pushed a commit to brianleach/openclaw that referenced this pull request Feb 26, 2026
mylukin pushed a commit to mylukin/openclaw that referenced this pull request Feb 26, 2026
r4jiv007 pushed a commit to r4jiv007/openclaw that referenced this pull request Feb 28, 2026
zooqueen pushed a commit to hanzoai/bot that referenced this pull request Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant