Skip to content

fix(agent): implement exponential backoff retry in loop - #32

Merged
Nithwin merged 1 commit into
v2from
fix/agent-retry
Jul 26, 2026
Merged

fix(agent): implement exponential backoff retry in loop#32
Nithwin merged 1 commit into
v2from
fix/agent-retry

Conversation

@Nithwin

@Nithwin Nithwin commented Jul 26, 2026

Copy link
Copy Markdown
Owner

This PR resolves BUG-002 from the v2 roadmap by implementing an exponential backoff retry mechanism inside the agent's main execution loop.

Key Changes:

  • Updated internal/agent/loop.go to wrap the a.provider.Stream() call in a retry loop.
  • The agent will now attempt up to 3 retries for transient API errors.
  • Added an exponential backoff delay (1s, 2s, 4s) between retries to respect API rate limits.
  • Ensured that if the user manually cancels the operation (via ctx.Err()), the retry loop immediately breaks to prevent unkillable processes.
  • Also updated todo/11_BUGFIXES.md to check off BUG-001 (previously fixed in PR feat(memory): implement token-aware sliding window memory management #28), BUG-002, and BUG-003.

@Nithwin
Nithwin merged commit 8e08e7a into v2 Jul 26, 2026
@Nithwin
Nithwin deleted the fix/agent-retry branch July 26, 2026 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant