Skip to content
Back to skills

1503 2026 01 21 Stream Hang Timeout 8c4bc78d

ASecurity

Requests hang in the model request phase and eventually hit the global 120s timeout. History cleanup is no longer the blocker; the hang occurs before streaming opens and persists even after forcing a non-streaming fallback.

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 11, 2026
ai-agentsnodeapi

Works with

  • api

Security analysis

A100/100

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 1503-2026-01-21_stream-hang-timeout_8c4bc78d --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 1503 2026 01 21 Stream Hang Timeout 8c4bc78d?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 1503 2026 01 21 Stream Hang Timeout 8c4bc78d
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-1503-2026-01-21-stream-hang-timeout-8c4bc78d/badge)](https://www.skillsdirectory.com/skills/tools-only-1503-2026-01-21-stream-hang-timeout-8c4bc78d)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
---
title: Model Request Hangs Before Stream Opens
link: stream-hang-timeout
type: debug
created_at: 2026-01-21T13:00:00Z
updated_at: 2026-01-21T13:00:00Z
tags:
  - stream
  - timeout
  - model-request
  - debug
---

# Model Request Hangs Before Stream Opens

## Summary
Requests hang in the model request phase and eventually hit the global 120s timeout. History cleanup is no longer the blocker; the hang occurs before streaming opens and persists even after forcing a non-streaming fallback.

## Evidence (Latest Debug)
- History is clean; no tool calls or dangling tool returns.
- Stream init occurs, but stream never opens.
- Stream watchdog fires at 30s and falls back to non-streaming.
- After fallback, request still times out at 120s with GlobalRequestTimeoutError.

Key log lines:
- `Stream init: node=ModelRequestNode request_id=f3551347 iteration=2 ctx_messages=0 ctx_messages_type=None`
- `Stream request parts: count=1 type=ModelRequest`
- `Stream request part[0]: kind=user-prompt content=gm gm (5 chars)`
- `Stream watchdog timeout after 30.0s; falling back to non-streaming`
- `GlobalRequestTimeoutError: Request exceeded global timeout of 120.0s`

## What We Tried
1. Fixed dangling tool-call cleanup to scan the full history and remove unmatched tool calls.
2. Added detailed debug logging for history, request parts, response parts, and tool returns.
3. Added a stream watchdog timeout to abort streaming after 30s and fall back to non-streaming.

## Conclusion
The hang is inside the model API call (or provider streaming start), not history corruption. The request payload is minimal and valid, but the provider never opens a stream or returns a response.

## Next Step (Not Implemented)
Add a hard request-level watchdog/fallback strategy (e.g., cancel and retry with non-streaming or alternate provider) or verify provider health/configuration.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…