open-swe/agent/middleware
langsmith-forge-dev[bot] c61d8b0376
fix: stop agent retrying commit_and_open_pr on 403 permission denied (#1123)
* fix: stop agent retrying commit_and_open_pr on 403 permission denied

Detect 403/permission-denied push failures in commit_and_open_pr and
return a PERMANENT_FAILURE message so the LLM stops retrying. Also add
prompt-level guidance to the COMMIT_PR_SECTION reinforcing this. Add
unit tests covering both the 403 and non-403 push failure paths.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: stop safety net retrying permanent push failures

Skip the after-agent PR fallback when commit_and_open_pr reports a permanent GitHub push authorization failure, while preserving fallback behavior for recoverable failures.

---------

Co-authored-by: Claude Agent <agent@anthropic.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Johannes du Plessis <johannes@langchain.dev>
2026-05-01 19:37:53 +00:00
..
__init__.py chore: Drop monorepo (#1029) 2026-03-06 16:10:34 -08:00
check_message_queue.py chore: Drop monorepo (#1029) 2026-03-06 16:10:34 -08:00
ensure_no_empty_msg.py fix: skip no_op injection when PR is committed and user is notified (#1047) 2026-03-10 12:56:44 -07:00
open_pr.py fix: stop agent retrying commit_and_open_pr on 403 permission denied (#1123) 2026-05-01 19:37:53 +00:00
tool_error_handler.py chore: Drop monorepo (#1029) 2026-03-06 16:10:34 -08:00