1. Zero Data Retention (ZDR) & Compliance
ZDR ensures data is not stored after an API response is returned. Eligibility is determined per feature.
ZDR-Eligible
- Adaptive Thinking / Effort
- Citations
- Compaction
- Standard Web Search / Web Fetch
- Structured Outputs (prompts/results only)
NOT ZDR-Eligible
- Message Batches (stored 29 days)
- Files API
- Code Execution
- MCP Connector (server-side routing)
HIPAA schema safety: JSON schemas are cached for 24 hours separately from message content. PHI must never appear in tool names, property names, or descriptions; use generic fields like record_id instead of patient_ssn.
2. Core Technical & API Limits
| Feature | Limit / Value |
|---|---|
| Context Windows | 1M tokens (Opus 4.7/4.6, Sonnet 4.6) • 200k tokens (most other active models) |
| Batch Max Tokens | 300,000 using the output-300k-2026-03-24 header |
| Strict Tool Limits | Max 20 strict tools • 24 optional parameters • 16 union types (for example anyOf) per request |
| Description Length | Tool and Skill descriptions must be under 1024 characters |
| Message Batches | Max 100,000 requests or 256 MB per batch • Results expire after 29 days |
| Compaction Trigger | Minimum 50,000 tokens |
3. Agentic Loop & Orchestration Signals
The orchestrator must drive control flow using structured API signals rather than natural language parsing.
| Signal / Pattern | Meaning |
|---|---|
stop_reason == "tool_use" | The loop continues. Execute the tool, append the tool_result to history, and re-call the API. |
stop_reason == "end_turn" | The only reliable signal for termination. |
| Task Tool | Mechanism for spawning subagents. Coordinator allowed_tools must include "Task" to delegate. |
| Findings → Prompt Contract | Subagents are isolated by default and do not inherit the coordinator's history. Coordinators must explicitly pass findings into the subagent's prompt. |
4. Structured Error & Recovery Framework
Every tool should return structured metadata to enable intelligent coordinator-level recovery.
| Category | Recovery Behavior |
|---|---|
| TRANSIENT | Timeouts or service outages; Claude should attempt a retry. |
| VALIDATION | Invalid input, such as bad email format; agent should clarify with the user. |
| PERMISSION | Authorization gaps; agent should inform the user. |
| BUSINESS | Policy violations, such as refund over limit; agent should communicate the rule. |
isRetryable | Boolean metadata that prevents the model from wasting turns on non-fixable errors. |
5. Prompting & Schema Design Patterns
| Pattern | Use |
|---|---|
| Tool Description Pattern | [Input Shape] + [Canonical Use Case] + [Boundary / DO NOT use for X]. Eliminates misrouting between similar tools. |
| Reasoning-Led Few-Shotting | Include a Why: line in examples to teach the underlying logic so the model generalizes to novel cases. |
| Nullable Fields | Use ["string", "null"] to allow null when data is missing from a source, preventing hallucinations. |
| Extensible Enums | Use an enum field with an other option paired with a separate detail string field. |
6. Repository & Workflow Governance
| Governance Area | Rule |
|---|---|
CLAUDE.md Hierarchy | User (~/.claude/CLAUDE.md) → Project (root/CLAUDE.md) → Directory (subdir/CLAUDE.md). Directory-level files override project-level files. |
| Path-Scoped Rules | Located in .claude/rules/ using glob patterns such as **/*.test.tsx to load conventions only when matching files are edited. |
| Progressive Disclosure | Three-level skill structure: YAML frontmatter for trigger conditions, SKILL.md body for actionable steps, linked files for deep reference docs. |
| Session State | Resume if context is valid; fork to compare divergent what-if approaches; fresh start if context is stale or misleading. |
7. Reliability & Evaluation Checklist
| Checklist Item | Why It Matters |
|---|---|
| Case Facts Pattern | Place non-negotiable transactional data, such as Max Budget, in a persistent block outside summarized history so it survives compaction. |
| Stratified Random Sampling | Measure error rates across document or prospect segments, such as small startups versus large firms, so aggregate accuracy does not mask a weak segment. |
| Independent Review Instance | Final outputs should be audited by a fresh Claude session isolated from the generator's reasoning bias. |
| Information Provenance | Require subagents to output structured claim-source mappings, including URLs, excerpts, and dates, for downstream synthesis. |