# Per-agent provider resolution in compaction engine

**Status:** pending

Compaction currently resolves via `ProviderRegistry::default_provider()`
(`src/core/compact/mod.rs:154,181`). It doesn't have access to
`AgentInventory` to load `AgentState` for per-agent resolution — it uses
closure-based dependency injection (`get_messages`, `replace_messages`,
`get_repo`, `get_agent_type`).

## What needs doing

Add a `get_agent: Arc<dyn Fn(&str) -> Option<AgentState> + Send + Sync>`
closure (or pass `Arc<AgentInventory>` directly) so the Summary and
SlidingReflect strategy branches can call
`providers.for_agent(&agent_state)` instead of
`providers.default_provider()`.

## Why

Agents routed through a non-default provider (e.g. Vanguard → z.ai) will
fall back to Bifrost during compaction, which may fail if Bifrost's
virtual key doesn't permit the agent's model.
