Skip to content
Back to skills

463 2026 01 21 Resume Hang Investigation Updated C508743f

ASecurity

The debug logs now show: ``` [DEBUG] pydantic-ai ctx.messages count=56 [DEBUG] ctx.messages[0] type=ModelRequest [DEBUG] Stream init: ... ctx_messages=56 ctx_messages_type=list ```

  • 9 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added June 1, 2026
ai-agentsapi

Works with

  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned June 1, 2026

npx -y skills add tools-only/X-Skills --skill 463-2026-01-21_resume-hang-investigation-updated_c508743f --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 463 2026 01 21 Resume Hang Investigation Updated C508743f?

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

Security grade badge for 463 2026 01 21 Resume Hang Investigation Updated C508743f
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-463-2026-01-21-resume-hang-investigation-updated-c/badge)](https://www.skillsdirectory.com/skills/tools-only-463-2026-01-21-resume-hang-investigation-updated-c)

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

Download with Pro
SKILL.md
---
title: Session Resume Hangs After Tool Calls - UPDATED
link: resume-hang-investigation-updated
type: debug
created_at: 2026-01-21T21:00:00Z
updated_at: 2026-01-21T21:00:00Z
tags:
  - resume
  - hang
  - timeout
  - tool-calls
  - pydantic-ai
  - chutes
  - devstral
---

# Session Resume Hangs After Tool Calls - UPDATED

## BREAKTHROUGH: History IS Reaching pydantic-ai!

The debug logs now show:
```
[DEBUG] pydantic-ai ctx.messages count=56
[DEBUG] ctx.messages[0] type=ModelRequest
[DEBUG] Stream init: ... ctx_messages=56 ctx_messages_type=list
```

**This proves the message history is being passed to pydantic-ai correctly!**

## Current Symptom

- Session has 56 messages with tool calls
- pydantic-ai receives all 56 messages correctly
- Stream receives zero events from provider
- Times out after 30s (stream watchdog) then 120s (global timeout)

## What This Changes

**OLD theory (DISPROVEN):** Message history wasn't reaching pydantic-ai
**NEW theory:** Provider (Chutes/Devstral) is hanging when it receives message history containing tool calls

## Evidence

1. **Tool-call-free sessions resume fine** - You confirmed this
2. **Fresh sessions with tool calls work** - Because they start with empty history
3. **Only resumed sessions with tool call history hang** - Provider chokes on the historical tool calls

## Root Cause (Revised)

**The Chutes provider (mistralai/Devstral-2-123B-Instruct-2512) cannot handle message histories that contain tool calls.**

This is likely:
- Provider API limitation/bug
- Model doesn't support tool call history
- Configuration issue with Devstral

## Solution

**Immediate:** Use different provider for sessions with tool call history:
- Claude (Anthropic) - supports tool call history
- GPT-4 (OpenAI) - supports tool call history
- Other models that handle historical tool calls

**Long-term:** Report to Chutes that Devstral hangs on tool call history.

## Key Insight

This is **NOT a tunacode bug** - it's a **provider compatibility issue**. Our code works perfectly:
- ✅ Session serialization works
- ✅ pydantic-ai integration works
- ✅ Message history passes correctly
- ❌ Provider rejects tool call history

The fix is to avoid using Chutes/Devstral for complex sessions with tool call history.

Files in this skill

  • README.md1.1 KB
  • skill.md2.2 KB

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…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.