Agentic Errors

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/16

encourage image

There's no tags or description

Looks like no tags are added yet.

17 Terms

1
New cards

400 error after first tool call

Layer: Harness

Likely causes: tool_result sent with wrong role; tool_use_id mismatch; a tool_use with no matching result; results split across several user messages

Fix: One user message holding every result, ids matched

2
New cards

Infinite loop / hits max turns

Layer: Harness

Likely causes: Errors swallowed so the model retries forever; the same tool output each turn; loop exits only on end_turn

Fix: Return errors as is_error; dedupe or limit retries; handle every stop_reason

3
New cards

Answer cut off or malformed JSON

Layer: Harness

Likely causes: max_tokens too low; stop_reason == "max_tokens" treated as done; truncated tool_use input

Fix: Raise the limit; handle max_tokens explicitly; continue or retry

4
New cards

Breaks after enabling extended thinking

Layer: Harness

Likely causes: Thinking blocks dropped or edited when re-sending the assistant turn

Fix: Pass assistant content back unchanged

5
New cards

Works in sync, fails in async

Layer: Harness

Likely causes: Missing await; blocking calls in the event loop; shared mutable state across tasks

Fix: AsyncAnthropic, a semaphore, no shared state

6
New cards

Model picks the wrong tool

Layer: Tools

Likely causes: Overlapping or vague descriptions; tool names that mislead; too many tools

Fix: Sharper descriptions with when-to-use and when-not-to-use; merge or remove tools

7
New cards

Wrong arguments

Layer: Tools

Likely causes: Ambiguous schema (rsID vs HGVS, gene symbol vs Ensembl ID); no examples; no enums

Fix: Tighter schema, enums, examples in the description, validation errors the model can act on

8
New cards

Model misreads tool output

Layer: Tools

Likely causes: Huge raw JSON; errors returned as success; units or IDs missing

Fix: Shape output: concise fields, explicit errors, IDs kept for citations

9
New cards

Quality decays over long sessions

Layer: Context

Likely causes: Context bloat from full tool outputs; instructions lost far back; truncation dropping the system prompt

Fix: Truncate or summarize old results, sub-agents, retrieval instead of stuffing, caching the stable prefix

10
New cards

Ignores instructions or format

Layer: Prompt

Likely causes: Conflicting instructions; key rules buried; examples contradict rules

Fix: Restructure with XML sections; resolve conflicts; align the examples

11
New cards

Hallucinated citations or facts

Layer: Prompt Likely causes: No grounding requirement; tool returned no IDs; model asked to answer even when unsure

Fix: Require quotes or IDs from tool results; allow "not found"; add a verification step

12
New cards

Breaks after a model upgrade

Layer: Prompt

Likely causes: Reliance on prefill, quirks, or overly forceful prompting; parsing that assumed exact wording

Fix: Structured outputs or tool-based extraction; soften all-caps instructions; update parsing

13
New cards

Server won't connect or crashes

Layer: MCP

Likely causes: Logging to stdout breaks stdio JSON-RPC; wrong command or path in config; missing env vars

Fix: Log to stderr; fix config; validate env at startup

14
New cards

Tool called but returns junk

Layer: MCP

Likely causes: Schema mismatch; unhandled exceptions; the upstream API changed

Fix: Validate inputs; return structured errors

15
New cards

429s or 529s at volume

Layer: Scale

Likely causes: No concurrency limit; retries without backoff; retrying 400s

Fix: Semaphore, exponential backoff with jitter, retry only retryable errors, Batches API for offline work

16
New cards

Too slow or expensive

Layer: Cost / latency

Likely causes: Re-sending a large static context every turn; biggest model for every step; serial calls

Fix: Prompt caching, smaller models for routing and extraction, parallel calls

17
New cards

Agent acts on instructions found in data

Layer: Safety

Likely causes: Prompt injection via retrieved docs or tool output

Fix: Treat tool output as data; least-privilege tools; human approval for writ