-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Bug Description
During E2E test execution, the Anthropic SDK receives a non-integer timeout value, triggering multiple retry attempts with the warning:
[WARN] Retry attempt 1: timeout must be an integer (waiting 1084ms)
This warning appears repeatedly (up to 3 retry attempts) before the system falls back to alternative behavior.
Important context: All unit tests pass. This issue only manifests during E2E test execution with real API calls.
Steps to Reproduce
- Run
RUN_E2E_TESTS=true npm test -- tests/e2e/ - Observe the test output during scenario generation or execution
- See repeated "timeout must be an integer" warnings with retry attempts
Expected Behavior
API calls should succeed on the first attempt without timeout-related warnings. The timeout parameter should be passed as an integer to the Anthropic SDK.
Actual Behavior
Multiple retry attempts occur due to timeout type issues:
[WARN] Retry attempt 1: timeout must be an integer (waiting 1084ms)
[WARN] Retry attempt 1: timeout must be an integer (waiting 1044ms)
[WARN] Retry attempt 2: timeout must be an integer (waiting 2056ms)
[WARN] Retry attempt 2: timeout must be an integer (waiting 2004ms)
[WARN] Retry attempt 3: timeout must be an integer (waiting 4253ms)
[WARN] Retry attempt 3: timeout must be an integer (waiting 4044ms)
[WARN] LLM generation failed, using fallback scenarios
The system eventually falls back to alternative scenarios, so tests can proceed, but this indicates a parameter typing issue.
Environment
- OS: macOS
- Node.js: v25.x
- Test runner: Vitest
- Anthropic SDK: (check package.json for version)
Error Logs / CLI Output
[WARN] Retry attempt 1: timeout must be an integer (waiting 1022ms)
[WARN] Retry attempt 1: timeout must be an integer (waiting 1015ms)
[WARN] Retry attempt 2: timeout must be an integer (waiting 2040ms)
[WARN] Retry attempt 2: timeout must be an integer (waiting 2168ms)
[WARN] Retry attempt 3: timeout must be an integer (waiting 4220ms)
[WARN] Retry attempt 3: timeout must be an integer (waiting 4042ms)
[WARN] LLM generation failed, using fallback scenariosAdditional Context
- Unit tests pass without this warning
- The retry mechanism handles the error gracefully (fallback works)
- This suggests either:
- E2E test configuration passes a non-integer timeout
- A timeout value calculation somewhere produces a float instead of int
- A type coercion issue in the API client setup for E2E tests
Investigation should check:
- Where timeout values are set for E2E tests
- Whether
Math.floor()or similar is needed somewhere - The Anthropic SDK's timeout parameter requirements
Related to #289 - both are E2E-specific issues where unit tests pass.
🤖 Created with Claude Code