test(parallels): retry Windows agent idle exits · openclaw/openclaw@03bde3d
steipete
·
2026-05-01
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -920,15 +920,19 @@ for ($attempt = 1; $attempt -le 2; $attempt++) {
|
920 | 920 | '--json' |
921 | 921 | ) |
922 | 922 | $output = Invoke-OpenClaw @args 2>&1 |
| 923 | + $agentExitCode = $LASTEXITCODE |
923 | 924 | if ($null -ne $output) { $output | ForEach-Object { $_ } } |
924 | | - if ($LASTEXITCODE -ne 0) { throw "agent failed with exit code $LASTEXITCODE" } |
925 | | - if (($output | Out-String) -match '"finalAssistant(Raw|Visible)Text":\\s*"OK"') { |
| 925 | + if ($agentExitCode -eq 0 -and ($output | Out-String) -match '"finalAssistant(Raw|Visible)Text":\\s*"OK"') { |
926 | 926 | $agentOk = $true |
927 | 927 | break |
928 | 928 | } |
929 | 929 | if ($attempt -lt 2) { |
930 | | - Write-Host "agent turn attempt $attempt finished without OK response; retrying" |
| 930 | + Write-Host "agent turn attempt $attempt failed or finished without OK response; retrying" |
931 | 931 | Start-Sleep -Seconds 3 |
| 932 | + continue |
| 933 | + } |
| 934 | + if ($agentExitCode -ne 0) { |
| 935 | + throw "agent failed with exit code $agentExitCode" |
932 | 936 | } |
933 | 937 | } |
934 | 938 | if (-not $agentOk) { throw 'openclaw agent finished without OK response' }`, |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。