HIGH SEVERITYCONFIRMED
Middleware safety net skips recovery when commit_and_open_pr tool fails
Package
open-swe
Version
latest
Verified
2026-03-28
Description
In `open_pr.py:87`, the middleware checks `'success' in payload` rather than `payload['success'] == True`. The string `'success'` is always in the payload dict as a key — even when its value is `False`. The recovery logic is never triggered on tool failure.
Reproduction
payload = {'success': False, 'error': 'PR creation failed'}
if 'success' in payload: # True — key exists, value ignored
pass # Recovery skipped