Skip to content

fix: preserve Telegram transcript user turns#17

Merged
ihnotic merged 437 commits intomainfrom
codex/issue-telegram-context-sticky
May 1, 2026
Merged

fix: preserve Telegram transcript user turns#17
ihnotic merged 437 commits intomainfrom
codex/issue-telegram-context-sticky

Conversation

@ihnotic
Copy link
Copy Markdown
Owner

@ihnotic ihnotic commented May 1, 2026

Summary

  • restore active runner history from SessionManager when persisted user turns are missing from the restored active session
  • resolve history limits for account-scoped Telegram direct session keys
  • keep stale replay/no-reply/reset transcript fixes on the same deploy branch
  • restore the missing chat abort session-key export required by current main build

Fixes #16.

Verification

  • npx --yes [email protected] exec vitest run src/agents/pi-embedded-runner.get-dm-history-limit-from-session-key.returns-undefined-sessionkey-is-undefined.test.ts src/agents/pi-embedded-runner/run/attempt.spawn-workspace.context-engine.test.ts src/agents/pi-embedded-runner.sanitize-session-history.test.ts
  • npx --yes [email protected] exec vitest run src/agents/pi-embedded-runner/run/helpers.test.ts src/infra/outbound/payloads.test.ts src/infra/outbound/deliver.test.ts src/auto-reply/reply/reply-flow.test.ts src/gateway/server.sessions.reset-models.test.ts
  • npx --yes [email protected] exec vitest run src/gateway/chat-abort.test.ts src/gateway/server-methods/agent-session-supersede.test.ts
  • npx --yes [email protected] build

steipete and others added 30 commits May 1, 2026 11:44
…ut (openclaw#75594)

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 openclaw#75485.
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 f3efcb4.
- Required merge gates passed before the squash merge.

Prepared head SHA: f3efcb4
Review: openclaw#75582 (comment)

Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
…sages in session repair (openclaw#75606)

* 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. (openclaw#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. (openclaw#75313)

Closes openclaw#75271, closes openclaw#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 openclaw#75606.
steipete and others added 28 commits May 1, 2026 18:13
…penclaw#70515)

Merged via squash.

Prepared head SHA: 7c77974
Co-authored-by: davidangularme <[email protected]>
Co-authored-by: jalehman <[email protected]>
Reviewed-by: @jalehman
Drop incomplete OpenAI/Codex tool-call replay turns and avoid previous_response_id deltas when Responses store is disabled. Verified on Zeus with focused tests, build, UI build, channel probe, and live Telegram-session canary.
Suppress stale replayed final answers after newer Telegram/tool turns, supersede overlapping runs, and preserve current anchored output when replay frames contain old finals. Verified locally and on live Zeus with Telegram multi-skill expected-answer checks and ZeusChat model-switch browser checks.
@ihnotic ihnotic merged commit a3d4897 into main May 1, 2026
@ihnotic ihnotic deleted the codex/issue-telegram-context-sticky branch May 1, 2026 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Telegram direct sessions can lose prior user turns from model context