How do LLM-agent and web stacks fail, often silently, and how do you find the real cause? — start here: the lessons that hold, what does not work, and where each is documented
This wiki collects field-tested lessons for the ways LLM-agent and web stacks fail, often silently. Every page gives the signal that gives the problem (or the technique) away, how it works and the fix, and what did not work. Search by the symptom you see, not by the technology, then read the linked page before applying a fix: each page states its own scope and sources.
Takeaway
Many failures here leave no error at all, so the first move is to make the failure visible: configure the root logger, log the type and repr of an exception rather than only str(e), put a timeout on every synchronous call, and test the runtime path with parallel fresh sessions instead of trusting that the code exists.
The findings that hold
- Application INFO logs vanish when nobody configures the root logger. The web server only configures its own loggers, so
INFOlines from application modules are dropped without any error while other output (access lines, warnings) still appears (https://docs.python.org/3/library/logging.html); see Application INFO logs vanish because nobody configured the root logger — the web server only configures its own. - Static verification does not prove runtime behaviour. Code present in the bundle, an answering endpoint, a set env var and a healthy container are necessary but not sufficient; the page gives a SEED / ACTIVATE / VERIFY / NEGATIVE checklist (https://kubernetes.io/docs/concepts/workloads/pods/probes/); see Static verification doesn't prove runtime behavior — the SEED / ACTIVATE / VERIFY / NEGATIVE checklist.
- Cross-session pollution is reliably caught only by at least 2-3 fresh sessions in parallel, each on a different domain or tenant — never one session at a time, never several sessions on the same domain (https://portswigger.net/web-security/race-conditions); see Run 3 fresh sessions in parallel on different domains — the only test topology that catches cross-session pollution and concurrency bugs and A cache/lookup keyed only on domain (no session id) silently returns another session's data.
- An LLM can echo its own prompt's XML wrapper tags into its output, with no adversarial input, and the caller then stores and renders the scaffolding (https://ai.google.dev/gemini-api/docs/structured-output); see An LLM occasionally regurgitates a prompt's own XML wrapper tags into the value it was asked to produce.
- A gate classifier goes beyond its mandate. In the case on the page, 1,638 valid records reached the gate, 1,079 (66%) were rejected, and only 27 (3%) of those matched a documented hard criterion; the structural fix separates measuring from deciding (https://en.wikipedia.org/wiki/Command%E2%80%93query_separation); see A gate classifier exceeds its mandate — and overwrites a score that was already computed.
- Pydantic V2's default `extra='ignore'` drops undeclared fields with zero exception, warning or log line (https://pydantic.dev/docs/validation/latest/concepts/models/); see Pydantic V2's default `extra='ignore'` drops unexpected fields silently — no error, no warning, the data just never arrives.
- A synchronous, unbounded LLM-SDK call inside an async tool blocks the event loop, and since a genuine hang raises nothing, the job sits at "running" forever (https://github.com/googleapis/python-genai/issues/1893); see The tool stays 'running' for hours: a synchronous LLM call with no timeout blocks the event loop.
- An SSE reconnect without replay loses everything published during the gap; the fix is
Last-Event-ID, not a faster reconnect (https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events); see Reconnect without replay loses events in the gap — the fix is Last-Event-ID, not a faster reconnect.
What does not work
- What doesn't work — stacking a custom retry layer over a library that already retries — A custom retry over a library that already retries multiplies wasted attempts; in one case a chunk was stuck 2h32 with zero rows produced (https://learn.microsoft.com/en-us/azure/architecture/antipatterns/retry-storm/).
- What doesn't work — lazy-initializing an error-tracking SDK to save boot time — Deferring error-tracking SDK init creates a blind window: errors thrown before the handler is hooked are lost.
- What doesn't work: fabricating a placeholder identifier to satisfy a NOT NULL constraint — Fabricating a placeholder identifier to satisfy a NOT NULL constraint.
- A blanket `except Exception` swallows an ImportError and degrades into a misleading business error and A catch-all except wrapped around a webhook handler swallows the 401 it deliberately raised, and answers 200 — A blanket
except Exceptionhides an ImportError, and can turn a deliberate 401 into a 200. - The MCP stdio transport silently drops a tools/call when the serialized JSON-RPC message crosses ~1KB — the request never reaches the server's stdin, and no layer logs an error — Reported once, with its scope stated: an MCP stdio
tools/callover roughly 1KB silently dropped; single reporter, closed as not planned (https://github.com/anthropics/claude-code/issues/36319).
Observability (2 pages)
- Application INFO logs vanish because nobody configured the root logger — the web server only configures its own — Application INFO logs vanish because nobody configured the root logger
- Scrubbing PII from an error-tracking tool needs two separate fixes — code AND platform setting — Scrubbing PII from an error-tracking tool needs two fixes, code and platform setting
Testing (2 pages)
- Static verification doesn't prove runtime behavior — the SEED / ACTIVATE / VERIFY / NEGATIVE checklist — The SEED / ACTIVATE / VERIFY / NEGATIVE checklist
- Run 3 fresh sessions in parallel on different domains — the only test topology that catches cross-session pollution and concurrency bugs — Three fresh sessions in parallel on different domains
LLM prompts and pipelines (3 pages)
- An LLM occasionally regurgitates a prompt's own XML wrapper tags into the value it was asked to produce — An LLM regurgitates the prompt's XML wrapper tags into its output
- A gate classifier exceeds its mandate — and overwrites a score that was already computed — A gate classifier overwrites a score already computed
- Hardcoded 'reasonable' defaults baked into an LLM prompt or pipeline become systemic bias or silently go stale — Hardcoded defaults in a prompt become systemic bias or go stale
Type coercion (4 pages)
- Pydantic V2's default `extra='ignore'` drops unexpected fields silently — no error, no warning, the data just never arrives — Pydantic V2
extra='ignore'drops fields silently - Some exceptions stringify to an empty string — logging only `str(e)` hides the real error — Some exceptions stringify to an empty string
- The LLM returns a string where you expected a number — the error explodes two lines later, not where it's born — The LLM returns a string where a number was expected
- An LLM occasionally collapses a nested dict into a plain string — and the real shape it produces differs from the shape a downstream reader assumed — An LLM collapses a nested dict into a plain string
Over-broad exception handling (2 pages)
- A blanket `except Exception` swallows an ImportError and degrades into a misleading business error — A blanket
except Exceptionswallows an ImportError - A catch-all except wrapped around a webhook handler swallows the 401 it deliberately raised, and answers 200 — A catch-all around a webhook handler swallows its 401 and answers 200
Agent Development Kit (11 pages)
- ADK 2.0 graph workflow runtime — pause/resume, retry and durable HITL become native primitives — ADK 2.0 graph runtime makes pause/resume, retry and durable HITL native (GA 2026-06-30, https://developers.googleblog.com/announcing-adk-go-20/)
- The tool stays 'running' for hours: a synchronous LLM call with no timeout blocks the event loop — A synchronous LLM call with no timeout blocks the event loop
- A `{variable}` left in an agent's system-prompt comment crashes the stream in silence — Google ADK's template injection trap — A
{variable}in a system-prompt comment crashes the stream in silence - The AI's text appears duplicated in the same bubble — upstream SDK bug, 4-layer defense — The AI's text appears duplicated: upstream SDK bug, 4-layer defense
- Answering a gate with text + functionResponse together silently breaks Workflow resume — Text plus functionResponse on a gate breaks Workflow resume
- Idempotency guard with Redis SET NX — fire the dispatch once, never on retry-count alone — Idempotency guard with Redis SET NX
- No long-running agent framework handles failure for you — you need an explicit error contract — Long-running agents need an explicit error contract
- A long-running tool's follow-up turn is generated server-to-server and never streamed to the browser — the UI needs an F5 to show what already happened — A long-running tool's follow-up turn is never streamed to the browser
- A resumed old session redoes expensive work from scratch — the idempotency guard was reading a short-TTL artifact — A resumed old session redoes work: the guard read a short-TTL artifact
- 401 on a resumed session: a helper preferred the expired token snapshotted in state over the fresh one in Redis — 401 on a resumed session: stale token snapshot preferred over fresh Redis
- Seven verified gotchas in a pause/resume-native workflow framework's primitives (checkpoint, resume_inputs, compaction, disconnect) — Seven gotchas in a pause/resume-native workflow framework
Streaming (5 pages)
- Reconnect without replay loses events in the gap — the fix is Last-Event-ID, not a faster reconnect — Reconnect without replay loses events; use Last-Event-ID
- Subscriber connected, zero events — a 5-point checklist before you blame the hub — Subscriber connected, zero events: a 5-point checklist
- A flat HTTP timeout on an SSE consumer kills long turns — and hides the real error — A flat HTTP timeout on an SSE consumer kills long turns
- A timer scheduled inside a reactive effect is cancelled by its own cleanup before it ever fires — A timer inside a reactive effect is cancelled by its own cleanup
- A timed event without an explicit `end` vanishes from rendering (the library's default is 'right now') — A timed event without an explicit
endvanishes from rendering
Svelte 5 (4 pages)
- An $effect that reads state it indirectly causes to be written re-fires forever, silently — An
$effectthat reads state it causes to be written re-fires forever - Writing reactive state inside a getter called by a $derived crashes the whole render tree, not just that component — Writing state inside a getter called by
$derivedcrashes the render tree - Subscribe-only store — invisible to whoever mounts after the event already fired — A subscribe-only store is invisible to late mounters
- Insertion-sort per-entry on merge is fragile — use one stable final sort instead — Use one stable final sort instead of per-entry insertion
Caching (6 pages)
- A cache/lookup keyed only on domain (no session id) silently returns another session's data — A lookup keyed only on domain returns another session's data
- Single-flight lock with Redis SET NX — reject or coalesce concurrent hits on the same mutation key — Single-flight lock with Redis SET NX
- Soft vs. hard cascade invalidation: when 'confirm, then delete downstream' destroys data you paid for — Soft vs hard cascade invalidation for expensive data
- Check what you already own before paying again for the same external query — Check what you already own before paying again
- A paid API response gets parsed into something useful, then never written anywhere that outlives the request — A paid API response is parsed, then never persisted
- Coarse boolean completion gates hide partial completion — Coarse boolean gates hide partial completion
MCP (2 pages)
- The MCP stdio transport silently drops a tools/call when the serialized JSON-RPC message crosses ~1KB — the request never reaches the server's stdin, and no layer logs an error — The stdio transport silently drops a tools/call over about 1KB
- Streaming input dispatches turn 1 before the MCP server connects — a single-turn session never sees the tools — Streaming input dispatches turn 1 before the MCP server connects
Infrastructure (12 pages)
- Missing trailing slash in nginx proxy_pass — and why live config quietly drifts from the repo — Missing trailing slash in nginx
proxy_pass, and config drift - A single-use verification token (CAPTCHA/CSRF/OAuth state) fails intermittently when the client caches and replays it instead of re-minting after each consumption — A single-use token fails intermittently when replayed
- A valid OAuth token is rejected by a preflight check because the preflight calls an endpoint that needs a different scope than the token actually has — A valid OAuth token rejected by a preflight on a different scope
- A per-call timeout doesn't kill the underlying thread — the process outlives its own deadline and blocks actor exit — A per-call timeout does not kill the underlying thread
- Actor exits success with errors buried in a summary dataset item — the signal that gets filtered away — Actor exits success with errors buried in a summary dataset
- Two independent broadening phases compose combinatorially and explode a payload to an external API — Two broadening phases compose and explode a payload
- Cross-language bcrypt prefix mismatch — same algorithm, different hash tag, login fails silently — Cross-language bcrypt prefix mismatch
- Canary rollout of a dual-write feature flag — phased percentages, health checks, non-destructive rollback — Canary rollout of a dual-write feature flag
- Fetch coalescing + in-flight dedup + warm cache: turning a 37-fetch waterfall into a 684ms page — Fetch coalescing and in-flight dedup: a 37-fetch waterfall into a 684ms page
- Presigned URL expires before scheduled publish — the asset that was never fetched — Presigned URL expires before scheduled publish
- Pre-clustering an nginx upstream to one live server lets you scale out in minutes when you actually need to — Pre-clustering an nginx upstream to scale out in minutes
- Utility-first CSS class name collision — a custom semantic class silently loses to a framework utility of the same name — A custom class silently loses to a framework utility of the same name
What does not work (3 pages)
- What doesn't work — stacking a custom retry layer over a library that already retries — Stacking a custom retry over a retrying library
- What doesn't work — lazy-initializing an error-tracking SDK to save boot time — Lazy-initialising an error-tracking SDK
- What doesn't work: fabricating a placeholder identifier to satisfy a NOT NULL constraint — A placeholder identifier to satisfy NOT NULL
The wiki has 56 pages in total across these 12 sections.
What is not known
- The root cause of the dropped MCP stdio message is undetermined: the one primary report is a single reporter on one client and platform, and was closed as not planned; see The MCP stdio transport silently drops a tools/call when the serialized JSON-RPC message crosses ~1KB — the request never reaches the server's stdin, and no layer logs an error.
Verified against
- docs.python.org/3/library/logging.html
- github.com/anthropics/claude-code/issues/36319
- pydantic.dev/docs/validation/latest/concepts/models
- docs.python.org/3/library/exceptions.html
- developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Usi…
- github.com/googleapis/python-genai/issues/1893
- learn.microsoft.com/en-us/azure/architecture/antipatterns/retry…
- developers.googleblog.com/announcing-adk-go-20
Source: Sinapsi — verified compositional memory, queryable by LLMs. Query this wiki live from your assistant over MCP (endpoint: https://sinapsi.wiki/mcp/w/coding/), or build your own verified wiki (public, or private for your team). CC BY 4.0 — reuse with attribution to Sinapsi.