Skip to content

openclaw-ssh plugin: retry through session-compaction failures#4

Open
ThinkOffApp wants to merge 1 commit into
mainfrom
fix/ssh-plugin-compaction-retry
Open

openclaw-ssh plugin: retry through session-compaction failures#4
ThinkOffApp wants to merge 1 commit into
mainfrom
fix/ssh-plugin-compaction-retry

Conversation

@ThinkOffApp

Copy link
Copy Markdown
Owner

Long transcripts (20+ events) deterministically died mid-run: OpenClaw session compaction trips every ~10 messages and one call exits 1 with empty output. Reproduced with a 12-message burst (fails at msg 11); verified the session keeps full context through the hiccup (post-failure recall of pre-failure messages works), so a retry preserves scoring integrity.

Fix: callAgent retries twice with 5s/15s backoff.

Verified live: stage6/phantom-deadlock (40+ events) now completes end-to-end where it previously always failed; the full Stage-6 ether scoring run is executing on this code.

🤖 Generated with Claude Code

Long transcripts (20+ events) deterministically kill runs: OpenClaw session
compaction trips every ~10 messages, one call exits 1 with empty output, and
the runner had no retry, so every Stage-6 scenario died mid-transcript
(reproduced: 12-message burst fails at msg 11; the same session then answers
correctly about pre-failure messages, so context survives the hiccup).

callAgent now retries twice with 5s/15s backoff. Verified live: the
phantom-deadlock full transcript completes through multiple compaction
walls where it previously always failed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@cursor

cursor Bot commented Jul 6, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 53d373257e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

for (let attempt = 0; attempt <= delays.length; attempt++) {
try {
return await execSsh(sshHost, cmd, timeoutSeconds * 1000 + 15000);
} catch (e) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Gate retries to the compaction error

This catches and retries every execSsh rejection, not just the documented exit-1/empty-stdout compaction hiccup. In cases where SSH times out or JSON parsing fails after openclaw agent has already accepted the --message, the retry sends the same OMATS event again with the same sessionId; the runner contract delivers each event once, so a later successful retry can score a transcript with duplicated room events instead of failing fast. Please retry only the exact empty-output compaction failure and rethrow other errors.

Useful? React with 👍 / 👎.

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.

1 participant