# Moving beyond "Context Soup": How are you strictly bounding state and handoffs in multi-agent pipelines? — retained record

> Retained reddit record from reddit:AI_Agents.

Canonical: https://highsignal.app/data/records/a2bdd6c06db98f85

[← sources](https://highsignal.app/data)


source: [reddit](https://highsignal.app/data/reddit) (reddit:AI_Agents)  published 2026-10-24 16:49 ingested 2026-10-25 02:35

[original source ↗](https://www.reddit.com/r/AI_Agents/comments/1xedkfx/moving_beyond_context_soup_how_are_you_strictly/)

## retained text



```
Hey everyone,

I'm currently building a self-hosted multi-agent workflow on Linux that orchestrates local models (Ollama for routing, planning, and summary) alongside high-reasoning tools (like Claude Code CLI in headless mode) to execute tasks triggered from lightweight endpoints (Telegram/smartwatch).

The immediate architectural trap I ran into is the classic **"context soup"** problem: passing raw, unbounded conversation history between models. When every model reads everything and talks to everyone, you don't have an engineering system—you just have an expensive, non-deterministic group chat.

I'm treating this more like a formal distributed state machine (`Spec → Clarify → Plan → Atomic Diff → Deterministic Test → Review → Commit`), but I'd love to hear how folks here are handling the boundaries in production:

1. **State Bounding & Contracts:** How are you passing state between agents? Are you strictly typing payloads via schemas (e.g., Pydantic/JSON Schema) where each agent only gets an isolated slice of context (e.g., Coder only sees the atomic spec + target file; Reviewer only sees the diff + test logs), or are you relying on existing frameworks like LangGraph?
2. **Deterministic Verification over Model Review:** At what point do you cut off the models and rely purely on deterministic gates (syntax linters, `pytest`/`cargo test`, Git diff sanity checks) before handing off to a reviewer model?
3. **Loop Circuit Breakers:** What heuristics or retry ceilings ($N=2$, diff hash checks) do you use to stop two models from endlessly ping-ponging rejections and hallucinating fixes before escalating to human review?
4. **Tool/Provider Portability:** If system prompts, tool abstractions, and review policies are shaped tightly around a specific CLI or model, how are you isolating the coordinator so switching to an open-weight local model doesn't require a total rewrite?

Curious to hear practical, real-world architectural patterns—especially from anyone running deterministic pipelines or headless CLI agents behind webhooks.
```



document fetched 2026-10-25 00:19 · canonical https://reddit.com/r/AI_Agents/comments/1xedkfx/moving_beyond_context_soup_how_are_you_strictly
