Applications and Integration

20% of the CCDV-F exam. Read each answer, then drill this domain.

Drill this domainAll study notes

How do you consume a streaming response correctly?

Process events in order: message_start, then for each content block a start, deltas and a stop, then message_delta (which carries stop_reason and cumulative usage), and finally message_stop, the terminal event. Skip pings and unknown event types. Treat an error event as a failed response even after HTTP 200, and always read stop_reason so a max_tokens cut-off isn't shown as a complete answer.

Source: Streaming messages

Which errors should your integration retry, and how?

Retry rate limits (429), server errors (500), overload (529) and timeouts with exponential backoff and a limit. Honour retry-after and x-should-retry when present. Don't retry 400, 401, 403, 404 or 413: fix the request or credential. A 429 without retry-after that keeps failing is usually the monthly spend cap, and error_code ramp_limit_exceeded means traffic grew too fast.

Source: Claude API errors

When should you use the Message Batches API instead of realtime calls?

Use batches for large jobs that can wait: evaluations, nightly classification, bulk extraction. They cost 50% less, usually finish within an hour, return results within 24 hours, keep them for 29 days, and work with prompt caching on a best-effort basis. Keep realtime calls for anything interactive, because batch requests can't stream.

Source: Batch processing

How do Claude Code settings files combine, and how do you configure CI?

Single values come from the highest level: managed, then command line, project local, shared project and user. Lists such as permissions.allow merge across files. Some environment variables, such as ANTHROPIC_MODEL, override the matching settings key. In CI, run `claude -p` with the needed tools pre-approved, and put team configuration in the committed .claude/settings.json.

Source: Claude Code settings

Drill this domain