# Vllm Async Loading Debug

> Debug vLLM async KV loading and PegaFlow connector behavior. Use when investigating async KV loads, WAITING_FOR_REMOTE_KVS states, load/save intents, connector metadata flow, prefetch behavior, or preemption interactions in vLLM scheduler/worker code. Use when this capability is needed.

- Skill: `tomevault-io/vllm-async-loading-debug-2` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/vllm-async-loading-debug-2`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/vllm-async-loading-debug-2/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/vllm-async-loading-debug-2

---


# Vllm Async Loading Debug

## Overview

Trace the async KV loading path between vLLM scheduler and worker connectors, including prefetch and preemption edges.

## Workflow

### 1) Confirm async-load symptom

- Record request IDs and statuses: `WAITING`, `RUNNING`, `WAITING_FOR_REMOTE_KVS`, `PREEMPTED`.
- Check async-load logs and whether prefetch is in progress.

### 2) Follow scheduler-side decisions

- `python/pegaflow/connector/scheduler.py`: prefetch query + `LoadIntent` creation.
- `.project-plans/scheduler.py` (private): `load_kv_async` gating and `WAITING_FOR_REMOTE_KVS` transitions.

### 3) Follow worker-side lifecycle

- `python/pegaflow/connector/worker.py`: `start_load_kv()` calls `engine_client.load()` and tracks `PyLoadState`.
- `get_finished()` polls `is_ready()` and emits `finished_recving`.

### 4) Check preemption and retries

- `.project-plans/scheduler.py` (private): `_preempt_request()` and `reset_prefix_cache()` behavior.
- `invalid_block_ids` handling can trigger recompute or failure based on `kv_load_failure_policy`.

## Reference Files

- Read `references/async-loading.md` for full call flow and log markers.

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/novitalabs) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-11 -->

