Repository navigation
Description
Summary
When the Codex service handles voice transcription, notes longer than about 5 minutes always fail. Notes of 3 to 5 minutes fail now and then. The composer shows "Voice transcription timed out" with Retry and Download recording. Retrying fails the same way. #4774 raised core's voice budget to 70 s, but the Codex service still gives its host call a fixed 10 s deadline. gpt-transcribe needs about 1.7 s per minute of audio.
Versions and environment
- Reproduced at runtime on bb 0.43.4 (
npx bb-app), Linux 6.8 x64, codex-cli 0.156.1 with ChatGPT login, bb Connect paired. - Reproduced the exact code path on
mainatfd31b75fb9c7f40e68747089c911b098763aa851. A throwaway vitest file calledtranscribeCodexVoiceinplugins/provider-codex/src/ai/chatgpt-client.tsagainst the live endpoint. - 0.45.0 on npm still ships
TRANSCRIBE_TIMEOUT_MS = 10_000in the Codex plugin.
Steps to reproduce
- Settings → AI services → Voice: Codex, or automatic with Codex as the only ready voice service.
- Get about 7 minutes of natural speech, for example:
curl -sSLo ch1.mp3 https://archive.org/download/count_monte_cristo_0711_librivox/count_of_monte_cristo_001_dumas.mp3 && ffmpeg -ss 40 -i ch1.mp3 -t 420 -ac 1 -c:a libopus -b:a 64k n420.webm bb voice transcribe --json n420.webm, or dictate a 7-minute note in the composer.
Did not reproduce with: notes up to about 3 minutes (5 to 6 s).
Expected vs actual
Actual (0.43.4, bb voice transcribe, 7 min / 10 min of speech, every run):
{ "ok": false, "error": { "code": "transcription_timeout", "message": "HTTP 504: Voice transcription timed out" } } # ~20.5 s, two 10 s attempts
Actual (main fd31b75, transcribeCodexVoice with the plugin's timeoutMs):
n180.webm (3 min) timeout=10000 ok 5251ms
n420.webm (7 min) timeout=10000 FAILED 10010ms AiServiceFailure: Codex request timed out after 10000ms
Same call with timeoutMs=65000:
n420.webm (7 min) timeout=65000 ok 11600ms words=1122
Expected: a 7-minute note transcribes. Core already allows 70 s for voice.
Evidence
-
The Codex service hardcodes 10 s and passes it as the host deadline:
andconst TRANSCRIBE_TIMEOUT_MS = 10_000; bb/plugins/provider-codex/src/ai-service.ts
Lines 81 to 86 in fd31b75
timeoutMs: TRANSCRIBE_TIMEOUT_MS, }, { hostId, signal, timeoutMs: TRANSCRIBE_TIMEOUT_MS + HOST_CALL_GRACE_MS, -
The host enforces that deadline:
const deadline = createCodexRequestDeadline(command.timeoutMs, signal); -
Core allows 70 s:
. bb cloud uses 65 s:bb/apps/server/src/services/ai/ai-tasks.ts
Lines 18 to 22 in fd31b75
export const AI_TASK_TIMEOUT_MS: Record<AiTask, number> = { "thread-title": 5_000, "commit-message": 5_000, voice: 70_000, }; bb/plugins/bb-ai/src/server.ts
Line 29 in fd31b75
const TRANSCRIBE_TIMEOUT_MS = 65_000; -
Latency was timed with
bb voice transcribeon 0.43.4 after I lifted its 10 s cap locally (natural speech, Opus 64 kbps mono):Audio Time 3 min 5.0–6.3 s 5 min 8.1–8.9 s (10.2–10.4 s through bb Connect, including upload) 7 min 12.1 s 10 min 15.3 s 19 min 20.6 s, but the text stops after about 10 minutes of audio (1,571 words, vs. 1,568 for the 10-minute clip), with no error -
~/.bb/logs/server.*.logon 0.43.4 during the repro:Voice transcription failed {"attempts":2,"durationMs":20549,"errorCode":"ai_service_timeout","errorMessage":"Codex request timed out after 10000ms"}
What you ruled out
- bb Connect: 3, 5, 7 and 10-minute uploads through the tunnel transcribe once the deadline is raised (status 200).
- Recording format: Chrome MediaRecorder WebM/Opus (no duration, no cues, 250 ms timeslice) of natural speech transcribes 8/8 at 170 s.
- Prompt length: a 6,000–80,000 character
hinthas no effect. - Not Add voice transcription retries and preserve fallback billing #4774. That PR raised core and bb cloud budgets but left the Codex service at 10 s.
- Not Transcription often fails with HTTP 403 due to cloudflare when using codex subscription #1587 or Voice input fails persistently because the active Codex host generation is retired #4588. Those are a Cloudflare 403 and a retired host generation; this is a plain deadline.
Suggested priority and effort (optional)
Medium. It hits every Codex-served voice user who dictates more than about 5 minutes. The recording can be downloaded, but the transcription is lost. Effort: trivial, a few constants.
AGENT GENERATED
Activity
bb-slop-cop commentedon Oct 6, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotproviders,provider-codex.confirmed-repro.bottlebrushes commentedon Oct 6, 2026
Thanks. #5020 removes the 10 s cutoff. We'd like to suggest a larger budget, though, because 65 s leaves little headroom.
Why 65 s is tight
AI_TASK_TIMEOUT_MS.voice), so the provider can't go higher without changing core too.Proposed fix
Give voice a 5-minute budget in core, and let Codex use it with the same grace pattern:
HOST_CALL_GRACE_MS, the host call ends at 296 s, inside core's 300 s budget. Core still owns the abort and still reportstimeout.Verification on
mainatfd31b75:ai-service.test.tsexpectstimeoutMs: 295_000. It fails onmainand passes with the change.turbo run typecheck --filter=@bb/server --filter=bb-plugin-provider-codexpasses.bb-plugin-provider-codextests (348) and the server AI suites (ai-tasks,voice-transcription,ai-services-routes, 29 tests) pass.oxfmt --checkandgit diff --checkpass.The change is ready on a branch, and we can open a PR if that's useful, either instead of #5020 or folded into it. #5020's deadline regression test would carry over with the larger value.
Allow Codex voice requests to use the transcription budget (get-bb#5020)
ariofrio commentedon Oct 9, 2026
Another data point from a released build, in case it helps triage the backport question.
bb voice transcribe recording.webmon a 10-minute, 9.85 MB composer recording (video/webm) failed every time with504: Voice transcription timed out, after roughly 20 s.ffmpeg -f segment -segment_time 120) and transcribing each chunk succeeded on the first try, which matches the ~1.7 s/min budget described above.I confirmed the fix from #5020 is in the published
[email protected](gitHead4c87fdec7b7effc022ff2ee31ec95c0a09c9ee62hasTRANSCRIBE_TIMEOUT_MS = 65_000), so this only affects 0.45.x and earlier. Until users upgrade, the chunking workaround above works. Thread:thr_kgqesd8fxc.