#23745: fix(resilience): add timeout to unguarded fetch calls in browser subsystem
cli
size: XS
## Summary
- Problem: Several `fetch()` calls in the browser subsystem and CLI lack timeout/AbortSignal, risking indefinite hangs if remote endpoints are unresponsive
- Why it matters: A hanging fetch blocks the event loop caller, which can stall browser tool operations, camera capture, and extension relay authentication
- What changed: Added `AbortSignal.timeout(10_000)` to two unguarded fetch calls in `nodes-camera.ts` and `pw-session.ts`
- What did NOT change: Existing fetch calls in `chrome.ts` and `extension-relay-auth.ts` already use `AbortController` with timeouts and were left untouched
## Change Type
- [x] Bug fix
## Scope
- [x] Skills / tool execution
- [x] UI / DX
## Security Impact
- New permissions/capabilities? No
- Secrets/tokens handling changed? No
- New/changed network calls? No (existing calls get timeout added)
- Command/tool execution surface changed? No
- Data access scope changed? No
## Test plan
- [x] `npx vitest run src/browser/` — 40 test files, 261 tests passed
- [x] `npx vitest run src/cli/nodes-camera` — 1 test file, 15 tests passed
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Added 10-second timeouts to two previously unguarded `fetch()` calls in `pw-session.ts:417` and `nodes-camera.ts:81` using `AbortSignal.timeout(10_000)`, preventing indefinite hangs if remote endpoints become unresponsive.
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with minimal risk
- The changes are minimal, focused, and improve resilience by adding timeout protection to two unguarded fetch calls. The timeout value of 10 seconds is appropriate for these network operations. Tests pass, and the implementation follows best practices.
- No files require special attention
<sub>Last reviewed commit: 476ef7a</sub>
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#6916: fix(slack): add timeout to file download to prevent DoS (CWE-400)
by hclsys · 2026-02-02
81.8%
#19540: feat: add timeout and exponential backoff retry for frontend API calls
by Mozzzaic · 2026-02-17
77.5%
#16573: fix(signal): increase attachment fetch timeout to 30s (#16545)
by robbyczgw-cla · 2026-02-14
76.5%
#7247: fix(telegram): abort stale getUpdates connections after long-poll t...
by JanderV · 2026-02-02
75.1%
#11874: fix: handle fetch rejections in provider usage withTimeout
by Zjianru · 2026-02-08
73.4%
#17946: fix(browser): prevent act timeout on Linux by removing premature ab...
by rteece111 · 2026-02-16
73.1%
#11101: fix: handle AbortError and WebSocket 1006 in unhandled rejection ha...
by Nipurn123 · 2026-02-07
73.0%
#22411: fix(cron): cancel timed-out runs before side effects
by Takhoffman · 2026-02-21
72.4%
#6302: fix: Add timeouts to prevent indefinite hangs (issues #4954, #4956,...
by batumilove · 2026-02-01
72.3%
#9693: fix: add configurable browser.actTimeoutMs to prevent action timeouts
by JitendraZaa · 2026-02-05
72.2%