Skip to content

feat(cli): add openclaw sessions compact and fail loudly on CLI /compact (fixes #90640)#91378

Merged
sallyom merged 8 commits into
openclaw:mainfrom
Alix-007:issue-90640-sessions-compact-cli
Jun 19, 2026
Merged

feat(cli): add openclaw sessions compact and fail loudly on CLI /compact (fixes #90640)#91378
sallyom merged 8 commits into
openclaw:mainfrom
Alix-007:issue-90640-sessions-compact-cli

Conversation

@Alix-007

@Alix-007 Alix-007 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #90640.

  • Adds openclaw sessions compact <key> over the existing sessions.compact Gateway RPC.
  • Makes CLI agent --message '/compact' fail with a redirect instead of silently running an ordinary turn.
  • Preserves parent sessions --agent / --json; rejects unsupported inherited list options, including --store, --all-agents, --active, --limit, and --verbose.
  • Reports Codex app-server thread/compact/start as pending instead of a no-op.
  • Interrupts active runs before destructive --max-lines recovery.
  • Preserves the required transcript header and active tree semantics when trimming: removed ancestors are re-rooted, malformed controls remain transparent, out-of-window leaf targets fail safe, and retained compaction boundaries follow the normalized active branch.
  • Installs the replacement transcript with mode 0600, rollback, and partial-temp cleanup.
  • Requires an explicit ok:true RPC result before the CLI exits successfully.

Implementation notes

The Gateway remains the owner of target resolution and active-run interruption. Transcript mutation stays behind src/config/sessions/session-accessor.ts; it archives the original before installing the normalized replacement and clears stale token metadata only after success.

The Codex pending behavior was checked directly against sibling Codex source: thread/compact/start returns immediately and completion is reported asynchronously through turn/item notifications.

Real behavior proof

Behavior addressed: The production CLI reaches real Gateway compaction, CLI slash-command misuse exits non-zero, Codex pending results render correctly, unsupported inherited options fail before mutation, and manual trimming produces a private transcript that SessionManager can reopen without changing the selected branch.

Real environment tested: Local Node checkout plus AWS Crabbox Linux lease cbx_a5289b2e7c04 (swift-lobster, c7a.32xlarge). Gateway tests use a real in-process Gateway WebSocket and on-disk session stores/transcripts. Codex tests use the production compact adapter and an on-disk binding.

Exact steps or command run after this patch:

node scripts/run-vitest.mjs +  src/config/sessions/session-accessor.test.ts +  src/commands/sessions-compact.test.ts +  src/cli/program/register.status-health-sessions.test.ts +  src/gateway/server.sessions.compaction.test.ts +  src/gateway/server.sessions.list-changed.test.ts +  src/gateway/server.sessions.preview-resolve.test.ts +  src/gateway/server.sessions.store-rpc.test.ts +  src/commands/agent-via-gateway.test.ts +  extensions/codex/src/app-server/compact.test.ts

node scripts/run-oxlint.mjs <changed runtime and test files>
.agents/skills/autoreview/scripts/autoreview --mode local --no-web-search

Evidence after fix: Crabbox run run_ccc2ece105cb passed 239 tests across CLI, Gateway, filesystem, and Codex shards. Final-delta run run_4e6bfe528bca passed all 42 accessor reopen/tree tests. The Gateway regression proves canonical 500-line JSONL becomes a reopenable 50-line transcript, the original remains in .bak, and active-run interruption precedes mutation. Type-aware oxlint is clean. Final autoreview is clean with 0.89 confidence after all accepted findings were repaired.

Observed result after fix: Successful native trim reports compacted:true, retains the newest bounded suffix plus the session header, writes mode 0600, and reopens with the expected context. An active run that cannot be interrupted leaves the transcript and archive state untouched. Codex returns ok:true / compacted:false / pending:true and the CLI prints “Compaction started” without treating it as a no-op. Missing or false ok exits 1.

What was not tested: No GUI/screenshot path; this is CLI, Gateway, filesystem, and adapter behavior. No live external Codex account call; the exact upstream app-server protocol and request processor were inspected, and the production OpenClaw adapter was exercised with its real disk binding.

Tests

  • AWS Crabbox run_ccc2ece105cb: 239 passed.
  • AWS Crabbox run_4e6bfe528bca: 42 passed on the final transcript-tree delta.
  • Local focused Gateway/CLI/accessor/Codex suites: passed.
  • Type-aware oxlint: clean.
  • Fresh autoreview: clean.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation cli CLI command changes commands Command implementations size: M triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 8, 2026
@clawsweeper

clawsweeper Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed June 19, 2026, 3:45 PM ET / 19:45 UTC.

Summary
The PR adds openclaw sessions compact <key>, makes CLI /compact sent through agent --message fail loudly, and hardens manual transcript trimming through Gateway/session accessor code and docs.

PR surface: Source +474, Tests +758, Docs +51. Total +1283 across 15 files.

Reproducibility: yes. source-level: current main has sessions.compact as a Gateway RPC but no openclaw sessions compact registration, and CLI /compact is not rejected before normal dispatch. I did not run a live current-main repro because this review is read-only.

Review metrics: 2 noteworthy metrics.

  • Public CLI behavior: 1 subcommand added, 1 slash-message path changed. Maintainers should notice both the new recovery command and the intentional fail-closed behavior for existing /compact scripts before merge.
  • Persistent session mutation: 1 manual trim path hardened. The PR changes the archive/rewrite path for transcripts, which makes session-state proof more important than ordinary unit coverage.

Stored data model
Persistent data-model change detected: serialized state: src/commands/agent-via-gateway.test.ts, serialized state: src/commands/sessions-compact.test.ts, serialized state: src/commands/sessions-compact.ts, serialized state: src/config/sessions/session-accessor.test.ts, serialized state: src/config/sessions/session-accessor.ts, serialized state: src/gateway/server-methods/sessions.ts, and 10 more. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #90640
Summary: This PR is the active candidate fix for the open CLI/API compaction discoverability and silent /compact no-op issue; the merged trim-lifecycle PR overlaps the storage seam but does not replace this PR's CLI work.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P2] Wait for required exact-head checks to pass before merge.

Risk before merge

  • [P1] Existing automation that sends openclaw agent --message '/compact ...' will now fail with exit 1 instead of silently running an ordinary agent turn; this is intentional but compatibility-visible.
  • [P1] The --max-lines path archives and replaces persistent transcript state, so the session-state risk is real even though the PR now includes preflight, active-run interruption, 0600 replacement, rollback, and focused proof.
  • [P1] The PR proof does not include a live external Codex account call; the review relies on direct upstream Codex source inspection plus the production OpenClaw Codex adapter exercised with disk-backed tests.

Maintainer options:

  1. Accept the intentional CLI fail-fast (recommended)
    Treat the non-zero /compact CLI behavior as the compatibility tradeoff that prevents scripts from mistaking a silent no-op for successful compaction, and land after required exact-head checks pass.
  2. Require broader upgrade proof first
    If maintainers want more assurance for existing crons, ask for one extra real command transcript showing an old agent --message '/compact ...' script now exits 1 with the documented replacement path.
  3. Pause only if the compatibility policy changes
    If maintainers decide existing /compact CLI invocations must remain exit-0 compatible, pause this PR and redesign the user-facing contract before merge.

Next step before merge

  • [P2] No repair lane is needed; maintainers should use the existing land-ready review and exact-head CI status to decide merge.

Security
Cleared: No concrete security or supply-chain regression found; the diff adds no dependencies or CI execution paths and keeps transcript replacement private with rollback cleanup.

Review details

Best possible solution:

Land this PR after exact-head required checks are green, preserving the Gateway-owned compaction boundary and closing #90640 after merge.

Do we have a high-confidence way to reproduce the issue?

Yes, source-level: current main has sessions.compact as a Gateway RPC but no openclaw sessions compact registration, and CLI /compact is not rejected before normal dispatch. I did not run a live current-main repro because this review is read-only.

Is this the best way to solve the issue?

Yes. Wrapping the existing Gateway RPC and failing the unsupported CLI slash-command path is narrower than bypassing the authorized-sender checks, and it keeps target resolution and transcript mutation in the Gateway/session accessor owner boundary.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against bb1043b14c46.

Label changes

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body and maintainer comments include after-fix Crabbox/local command proof for CLI, Gateway, filesystem, and Codex-adapter behavior, with observed outputs and known gaps stated.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body and maintainer comments include after-fix Crabbox/local command proof for CLI, Gateway, filesystem, and Codex-adapter behavior, with observed outputs and known gaps stated.

Label justifications:

  • P1: The PR addresses a user-facing compaction recovery workflow that can silently no-op and leave sessions wedged or growing.
  • merge-risk: 🚨 compatibility: The PR intentionally changes openclaw agent --message '/compact ...' from an exit-0 ordinary turn into a non-zero guidance error.
  • merge-risk: 🚨 session-state: The PR exposes and hardens a transcript archive/rewrite path that can affect persisted session history and active-run state.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body and maintainer comments include after-fix Crabbox/local command proof for CLI, Gateway, filesystem, and Codex-adapter behavior, with observed outputs and known gaps stated.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body and maintainer comments include after-fix Crabbox/local command proof for CLI, Gateway, filesystem, and Codex-adapter behavior, with observed outputs and known gaps stated.
Evidence reviewed

PR surface:

Source +474, Tests +758, Docs +51. Total +1283 across 15 files.

View PR surface stats
Area Files Added Removed Net
Source 6 490 16 +474
Tests 8 807 49 +758
Docs 1 53 2 +51
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 15 1350 67 +1283

What I checked:

  • Current main still lacks the compact subcommand: Current main registers sessions list, cleanup, tail, and export-trajectory subcommands, with no sessions compact command present. (src/cli/program/register.status-health-sessions.ts:186, bb1043b14c46)
  • Current main still only prevents /compact timeout fallback: Current main treats /compact as a control command only when deciding whether a timed-out Gateway call may fall back to embedded execution; it does not fail before dispatching the CLI message. (src/commands/agent-via-gateway.ts:234, bb1043b14c46)
  • PR adds the first-class compact CLI wrapper: At PR head, sessions compact <key> is registered with Gateway connection options, parent --agent/--json inheritance, unsupported parent-option rejection, and strict --max-lines/--timeout parsing. (src/cli/program/register.status-health-sessions.ts:360, 13b4d49fa213)
  • PR fails CLI /compact before Gateway or embedded fallback: At PR head, agentCliCommand detects /compact variants, prints guidance to use openclaw sessions compact <key>, exits 1, and returns before normal dispatch. (src/commands/agent-via-gateway.ts:841, 13b4d49fa213)
  • PR requires explicit successful RPC payloads: The new command calls sessions.compact, exits non-zero on transport errors or any response where ok !== true, and renders Codex pending compaction separately from a no-op. (src/commands/sessions-compact.ts:88, 13b4d49fa213)
  • Gateway trims only after no-op preflight and active-run interruption: The PR adds a non-mutating maxLines preflight and only interrupts an active run once the transcript is known to need destructive archive/rewrite. (src/gateway/server-methods/sessions.ts:2624, 13b4d49fa213)

Likely related people:

  • jalehman: Authored merged PRs that added the manual compact trim accessor seam and then adjusted canonical transcript reader identity in the central session accessor/Gateway files. (role: recent session compaction/accessor contributor; confidence: high; commits: e442b575b986, d216f7c876dd; files: src/config/sessions/session-accessor.ts, src/gateway/server-methods/sessions.ts)
  • Vincent Koc: Current-main blame on the central CLI/Gateway/session files points through recent broad edits to this area, so they may have context for current file shape even if not the original compaction owner. (role: recent adjacent area contributor; confidence: medium; commits: b470b1e21a8f; files: src/cli/program/register.status-health-sessions.ts, src/commands/agent-via-gateway.ts, src/gateway/server-methods/sessions.ts)
  • sallyom: Assigned to the PR and pushed/commented on the maintainer repair that added no-op preflight before active-run interruption for sessions.compact --max-lines. (role: PR repair reviewer; confidence: medium; commits: d3d1971b7a23, a0429dcc02fb; files: src/gateway/server-methods/sessions.ts, src/gateway/server.sessions.compaction.test.ts)
  • steipete: Pushed the final transcript-structure fix at PR head and posted the maintainer verification covering CLI, Gateway, accessor/tree, Codex, Crabbox, lint, and autoreview proof. (role: PR verification reviewer; confidence: medium; commits: 13b4d49fa213; files: src/config/sessions/session-accessor.ts, src/config/sessions/session-accessor.test.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. labels Jun 8, 2026
@openclaw-barnacle openclaw-barnacle Bot added proof: supplied External PR includes structured after-fix real behavior proof. and removed triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 8, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jun 8, 2026
@openclaw-barnacle openclaw-barnacle Bot added size: L and removed size: M proof: sufficient ClawSweeper judged the real behavior proof convincing. labels Jun 8, 2026
@clawsweeper clawsweeper Bot added status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P1 High-priority user-facing bug, regression, or broken workflow. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. labels Jun 8, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. proof: sufficient ClawSweeper judged the real behavior proof convincing. labels Jun 15, 2026
@sallyom sallyom self-assigned this Jun 19, 2026

sallyom commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Maintainer fix pushed in f284d57.

This addresses the local autoreview P2 finding: sessions.compact --max-lines was interrupting an active run before confirming the trim would actually mutate the transcript. If the transcript was missing or already <= maxLines, the RPC could return a no-op response after already aborting the active session.

The fix adds a non-mutating manual-trim preflight and only interrupts the active run when preflight proves archive/rewrite is needed. It also adds regression coverage for active-run no-op cases: already-short transcript and missing transcript.

Local proof before push:

  • pnpm test src/gateway/server.sessions.compaction.test.ts
  • pnpm test src/commands/sessions-compact.test.ts src/commands/agent-via-gateway.test.ts src/cli/program/register.status-health-sessions.test.ts src/gateway/server.sessions.compaction.test.ts extensions/codex/src/app-server/compact.test.ts
  • git diff --check
  • .agents/skills/autoreview/scripts/autoreview --mode local clean on the staged fix

sallyom commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Maintainer review: merge-ready once checks are green.

This is a narrow fix for a real user-facing gap: the existing sessions.compact Gateway RPC had no first-class CLI wrapper, and openclaw agent --message '/compact ...' could silently no-op instead of compacting. The PR adds openclaw sessions compact <key> around the existing RPC and makes the unsupported CLI slash-command path fail loudly with guidance.

Maintainer fix f284d57 addressed the local autoreview P2 by ensuring --max-lines only interrupts active runs when preflight proves a destructive transcript archive/rewrite is needed. Follow-up f8454c6 fixed the one CI lint issue from that preflight change.

Validation:

  • ClawSweeper review clear
  • local autoreview clean after maintainer fix
  • focused local tests passed
  • lint issue fixed locally and pushed
  • CI in progress; merge once the current run is green

No unintended breaking changes found. The compatibility-visible agent --message '/compact' exit behavior is intentional and part of the bug fix.

Alix-007 and others added 8 commits June 19, 2026 15:14
…mpact`

`sessions.compact` was reachable only as an internal Gateway RPC — no CLI
command, no docs — and `openclaw agent --message '/compact'` silently no-opped
with exit 0 because the slash-command handler rejects CLI-originated senders,
so the message fell through to an ordinary agent turn that compacted nothing.

- Add `openclaw sessions compact <key>` wrapping the existing `sessions.compact`
  RPC; exit non-zero on a transport error or an `ok:false` payload so automation
  never mistakes a silent no-op for success.
- Reject `openclaw agent --message '/compact'` with a redirect to the new
  command and exit 1 instead of a silent exit 0. The shared chat-side `/compact`
  handler is left untouched (no compatibility / message-delivery blast radius).
- Strictly validate `--max-lines` and `--timeout` (positive integers only).
- Document the command and the `sessions.compact` RPC in docs/cli/sessions.md.

Fixes openclaw#90640.
`openclaw sessions compact <key>` did not merge the parent `sessions`
command options the way its sibling subcommands (list/cleanup/info/…) do,
so a parent-level `--agent`/`--json` was silently dropped. In particular
`openclaw sessions --agent work compact <key>` compacted the default
agent's session instead of the work agent's — a wrong-target session-state
mutation.

Merge the parent options in the compact action (parent `--agent`/`--json`,
with the compact-level option taking precedence) and add regression
coverage for parent `--agent`, parent `--json`, and the compact-level
override.

Refs openclaw#90640.
…nt options

Address two ClawSweeper review findings on the `sessions compact` command:

- `sessions-compact.ts`: the Codex app-server `thread/compact/start` path
  returns `ok:true / compacted:false` with a pending marker, meaning the
  compaction was *started* asynchronously. The formatter collapsed every
  non-compacted success into "No compaction needed", so Codex users were told
  nothing happened. Report it as a started/pending compaction instead.
- `register.status-health-sessions.ts`: the parent `sessions` command defines
  list-only options (`--store`/`--all-agents`/`--active`/`--limit`) that the
  compact action previously ignored. Silently dropping a parent `--store` is
  dangerous — the gateway resolves the target store itself, so a user could
  believe they targeted one store while another is mutated. Reject any
  unsupported inherited parent option with a clear error and a non-zero exit.

Add regression tests for the pending-compaction message and the rejected
parent options.

Refs openclaw#90640.
…ve runs

The non-maxLines (LLM) compact branch interrupts an active session run before
compacting, but the maxLines truncate branch read the tail, archived, and
overwrote the transcript in place without that guard. Exposing `--max-lines`
as a documented CLI command (this PR) would make the active-run data-loss mode
tracked by openclaw#72765 easy to trigger from ordinary CLI usage.

Run the same interruptSessionRunIfActive guard in the maxLines branch before
reading the tail and truncating, matching the LLM compact path. Add gateway
regression coverage over a real in-process Gateway: with no active run, the
maxLines branch truncates the on-disk transcript 500 -> 50 and preserves the
original 500 lines in the .bak archive; with an active embedded run, the
maxLines branch fires the same interrupt (abort + wait-for-end) before
archiving and truncating.
The new "Compact a session" section was inserted between the cleanup
section's inline "Related:" list and the page's final "## Related"
block, splitting related-link content around the command docs. Move the
compact section above the related-links area and merge the orphaned
"Session config" link into the single final "## Related" block.
@steipete

Copy link
Copy Markdown
Contributor

Maintainer verification complete.

  • Read the CLI, Gateway, transcript accessor/tree, native compaction, Codex adapter, and direct sibling Codex app-server protocol/request processor paths.
  • Maintainer repair preserves the transcript header, normalized active branch, malformed-control transparency, leaf selection, compaction boundaries, private 0600 replacement, rollback, and temp cleanup. CLI success now requires explicit ok:true.
  • AWS Crabbox cbx_a5289b2e7c04 (swift-lobster) run run_ccc2ece105cb: 239 CLI/Gateway/filesystem/Codex tests passed.
  • Final-delta Crabbox run run_4e6bfe528bca: 42 accessor reopen/tree tests passed.
  • Type-aware oxlint: clean. Fresh final autoreview: clean (0.89).
  • Exact-head fallback CI: https://github.com/openclaw/openclaw/actions/runs/27844260763
  • Known gaps: no live external Codex account call; exact upstream source contract was inspected and the production adapter was exercised with a real disk binding.

Land-ready at 13b4d49fa213f8c7dce59ab08839625a2e541201.

@steipete

Copy link
Copy Markdown
Contributor

Merged as e35e5f123ddae0fbcef1d578ada7c06b1647017b from the exact reviewed head 13b4d49fa213f8c7dce59ab08839625a2e541201.

Maintainer proof before merge:

Closes #90640.

@Alix-007

Copy link
Copy Markdown
Contributor Author

Thanks @sallyom for catching the regression and getting it across the line — appreciate it! 🙏

@redasadki

Copy link
Copy Markdown

Flagging: issue #90640 was closed on 2026-06-19 with this PR listed as the implementation candidate, but the PR is still open and unmerged. From the outside it looks like the issue was closed prematurely — the CLI sessions compact command doesn't exist yet on the released version (confirmed on 2026.6.10).

Not a blocker just wanted to flag in case the premature issue-close caused it to drop off the board.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes commands Command implementations docs Improvements or additions to documentation gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug/feat(api): sessions.compact RPC is undocumented with no CLI command; openclaw agent --message '/compact' silently no-ops with exit 0

4 participants