openclaw-ssh plugin: retry through session-compaction failures#4
openclaw-ssh plugin: retry through session-compaction failures#4ThinkOffApp wants to merge 1 commit into
Conversation
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>
|
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. |
There was a problem hiding this comment.
💡 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) { |
There was a problem hiding this comment.
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 👍 / 👎.
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:
callAgentretries 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