codeep 1.2.64 → 1.2.65

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -283,6 +283,18 @@ export async function runAgent(prompt, projectContext, options = {}) {
283
283
  await new Promise(resolve => setTimeout(resolve, 1000 * retryCount));
284
284
  continue;
285
285
  }
286
+ // Handle 429 rate-limit / server overload with retry + backoff
287
+ if (err.message.includes('429')) {
288
+ retryCount++;
289
+ const waitSec = Math.min(5 * retryCount, 30); // 5s, 10s, 15s … max 30s
290
+ debug(`429 rate limit (retry ${retryCount}/${maxTimeoutRetries}), waiting ${waitSec}s`);
291
+ opts.onIteration?.(iteration, `Server busy (429), retrying in ${waitSec}s... (${retryCount}/${maxTimeoutRetries})`);
292
+ if (retryCount >= maxTimeoutRetries) {
293
+ throw error; // Give up after max retries
294
+ }
295
+ await new Promise(resolve => setTimeout(resolve, waitSec * 1000));
296
+ continue;
297
+ }
286
298
  throw error;
287
299
  }
288
300
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeep",
3
- "version": "1.2.64",
3
+ "version": "1.2.65",
4
4
  "description": "AI-powered coding assistant built for the terminal. Multiple LLM providers, project-aware context, and a seamless development workflow.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",