Skip to content

fix(agents): preserve settled tool continuation boundary - #142471

Merged
RomneyDa merged 1 commit into
extended-stable/2026.6.33from
fix/extended-stable-telegram-empty-recovery
Sep 8, 2026
Merged

RomneyDa merged 1 commit into
extended-stable/2026.6.33from
fix/extended-stable-telegram-empty-recovery

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Sep 8, 2026

Copy link
Copy Markdown
Member

Release blocker

The packaged Telegram recovery scenario in Full Release Validation 34261943173 reached the settled-tool continuation from #141916, then produced no matching final marker. Its artifact records four model fetches before the only outbound reply and a retry of the same Telegram inbound message.

Root cause

#141916 disabled tools for its one recovery pass but left the already-persisted inbound message as the next attempt's prompt. That replays the source user turn instead of continuing from the settled assistant/tool transcript. The runner already owns the canonical boundary for this case: internal continuations use a new model prompt and suppress re-persisting the current inbound message.

Fix

When the current channel message is known to be persisted, use the settled-tool instruction as the next model prompt and mark the next attempt as persistence-suppressed. The recovery still has no tools. If persistence is not proven, retain #141916's existing prompt-addition path rather than dropping user input.

Proof

  • Red: the focused settled-write test observed the old second attempt as prompt: "hello\\n\\n<continuation>" with suppressNextUserMessagePersistence: false.
  • Green: node scripts/run-vitest.mjs src/agents/embedded-agent-runner/run.incomplete-turn.test.ts — 113 passed.
  • pnpm exec oxfmt --check src/agents/embedded-agent-runner/run.ts src/agents/embedded-agent-runner/run.incomplete-turn.test.ts — passed.
  • node scripts/check-changed.mjs --dry-run -- src/agents/embedded-agent-runner/run.ts src/agents/embedded-agent-runner/run.incomplete-turn.test.ts — core, coreTests.
  • git diff --check — passed.

Production delta: +9 lines; test delta: +13 lines. The production addition is the current-message identity gate plus an ownership comment; it avoids reintroducing a second user leaf into a persisted conversation.

@clawsweeper

clawsweeper Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: XS maintainer Maintainer-authored PR labels Sep 8, 2026
@RomneyDa

RomneyDa commented Sep 8, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@RomneyDa
RomneyDa merged commit 28cde67 into extended-stable/2026.6.33 Sep 8, 2026
97 checks passed
@RomneyDa
RomneyDa deleted the fix/extended-stable-telegram-empty-recovery branch September 8, 2026 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling maintainer Maintainer-authored PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant