open-swe/agent
langsmith-forge[bot] bd97678a5e
fix: prevent futile retry loop when commit_and_open_pr fails (#1210)
* fix: prevent futile retry loop when commit_and_open_pr fails with git/API errors

- Root cause: when git checkout or GitHub PR API fails, the tool returned a generic {"success": false} error with no signal that retrying is futile, causing the agent to loop 9-13+ times until hitting the 1000-step recursion limit
- Change: (1) git_checkout_branch now returns (bool, str) so the actual git error output is surfaced in the tool response; (2) checkout and PR creation failures now include "fatal": true and an explicit "Do not retry" message; (3) prompt.py COMMIT_PR_SECTION adds an explicit instruction to stop on fatal errors
- Verified: 109 unit tests pass, no regressions

* fix: skip PR safety net on fatal commit failures

* style(open_pr): ruff-format fatal retry skip condition

---------

Co-authored-by: LangSmith Forge <forge-agent@langsmith.ai>
Co-authored-by: Johannes du Plessis <johannes@langchain.dev>
2026-05-01 22:05:22 +00:00
..
integrations fix: lower default LangSmith sandbox size to fit "large" tier (#1226) 2026-04-30 13:24:15 -07:00
middleware fix: prevent futile retry loop when commit_and_open_pr fails (#1210) 2026-05-01 22:05:22 +00:00
tools fix: prevent futile retry loop when commit_and_open_pr fails (#1210) 2026-05-01 22:05:22 +00:00
utils fix: prevent futile retry loop when commit_and_open_pr fails (#1210) 2026-05-01 22:05:22 +00:00
encryption.py chore: Drop monorepo (#1029) 2026-03-06 16:10:34 -08:00
prompt.py fix: prevent futile retry loop when commit_and_open_pr fails (#1210) 2026-05-01 22:05:22 +00:00
server.py fix: coerce malformed integer strings in read_file offset/limit params (#1216) 2026-05-01 14:29:48 -07:00
webapp.py feat: give agent ability to read cross-posted Slack message links [closes OPE-37] (#1200) 2026-04-29 17:42:27 -07:00