happy connect codex fails with "timeout of 5000ms exceeded" when registering vendor token
Description:
Running happy connect codex successfully completes the OAuth authentication step, but then immediately fails with:
Error: Failed to register vendor token: timeout of 5000ms exceeded
After digging into the source, I found that registerVendorToken in dist/types-7HcYY6Ao.mjs (and the CJS equivalent) has a hardcoded timeout: 5e3 on the axios POST call to /v1/connect/{vendor}/register:
const response = await axios.post(
${configuration.serverUrl}/v1/connect/${vendor}/register,
{ token: JSON.stringify(apiKey) },
{
headers: { ... },
timeout: 5e3 // ← this is the problem
}
);
5 seconds seems too tight for this request — the OAuth token payload can be fairly large, and depending on network conditions the server just doesn't respond in time. I bumped it to 3e4 (30s) locally and it went through without issues.
Suggested fix: Either increase the default timeout, or make it configurable via an env var (similar to how HAPPY_DAEMON_HTTP_TIMEOUT works for the daemon HTTP client).
Environment:
- happy version: 0.12.0
- Platform: macOS (darwin arm64)
- Node.js: v25.8.1