* fix(agents): trim trailing assistant turns and rewrite blank user messages in session repair
Session-file repair now:
- Trims trailing assistant messages so the JSONL never ends on
role=assistant, preventing the Anthropic 400 prefill-loop that
fires when thinking is enabled. (#75271)
- Rewrites blank-only user messages to a synthetic '(continue)'
placeholder instead of dropping them, so strict providers
(Qwen/mlx-vlm, Anthropic) no longer reject transcripts missing
a user turn. (#75313)
Closes#75271, closes#75313.
* refactor: clean up comments in session-file repair
* fix(agents): preserve trailing assistant tool-call turns during session trim
Mirror the outbound guard (stripTrailingAssistantPrefillTurns):
skip assistant entries containing toolCall/toolUse/functionCall
blocks so transcript repair can synthesize missing tool results.
Addresses PR review feedback from clawsweeper on #75606.
Summary:
- The PR updates the shared status reaction controller to track active remove-capable reactions, defer cleanup until clear/restoreInitial, adjust controller and Slack lifecycle tests, add a changelog entry, and carries qrcode runtime-dependency mirror hunks from its older base.
ClawSweeper fixups:
- Included follow-up commit: fix: limit status reaction restore cleanup
- Included follow-up commit: chore: merge main into status reaction cleanup
- Included follow-up commit: fix: mirror qrcode runtime dependency
Validation:
- ClawSweeper review passed for head f3efcb4fd3.
- Required merge gates passed before the squash merge.
Prepared head SHA: f3efcb4fd3
Review: https://github.com/openclaw/openclaw/pull/75582#issuecomment-4358876584
Co-authored-by: Peter Steinberger <steipete@steipete-macstudio.local>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Add inline docker build commands for npm-installed users who don't have the
source checkout scripts. Update all docs referencing sandbox-setup.sh,
sandbox-common-setup.sh and sandbox-browser-setup.sh to note they are
source-checkout-only and link to the new inline instructions.
Fixes#75485.