Skip to content

Commit 83f0167

Browse files
Potential fix for pull request finding 'Empty except'
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
1 parent 3c84d99 commit 83f0167

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎evalbench/generators/models/claude_code.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1212,8 +1212,10 @@ def send(self, prompt: str) -> subprocess.CompletedProcess:
12121212
if event.get("type") == "result":
12131213
got_result = True
12141214
break
1215-
except (ValueError, OSError):
1216-
pass
1215+
except (ValueError, OSError) as e:
1216+
# The subprocess may be killed by the watchdog or exit mid-read;
1217+
# treat stream-read failures as a dead-process turn and continue.
1218+
logging.debug("Claude Code stdout read interrupted: %s", e)
12171219
finally:
12181220
watchdog.cancel()
12191221

0 commit comments

Comments
 (0)