Contracts and limits
Reference result states, resource ceilings and validation rules.
Planning results
| Status | Meaning |
|---|---|
| completed | InstructionPlan with fixed prompts and permitted capabilities |
| invalid_input | invalid_host_policy or invalid_request |
| unavailable | model_unavailable |
Session results
| Status | Meaning |
|---|---|
| completed | Plan and optional advisory |
| incomplete_context | Required lesson unavailable, tool context incomplete or summary context incomplete |
| unavailable | Model unavailable, provider failure or malformed response |
| denied | Required lesson denied |
| invalid_input | Invalid session input |
| limit_exhausted | Named limit or structure bound exceeded |
| cancelled | Host cancellation |
| deadline_exceeded | Local deadline expired |
Every session variant reports usage, provenance and tool outcomes. Only completed and incomplete_context contain a plan and optional advisory. Tool outcomes may be completed, incomplete_context, denied, invalid_input or unavailable. Inspect reasons and mutation receipts before deciding how to proceed.
Summary projection returns invalid_input or denied without a projection, or applied, revoked, duplicate, stale or conflict with a projection and possibly a new receipt. See committed summaries.
Session limits
The effective limit is the minimum of the frozen library ceiling, host options and request limits. Values must be nonnegative safe integers. Zero can disable an operation or exhaust a budget before execution.
| Limit | Ceiling |
|---|---|
| contextBytes | 65,536 |
| inputBytes | 16,384 |
| lessonBytes | 16,384 |
| toolResultBytes | 32,768 |
| responseBytes | 16,384 |
| outputBytes | 65,536 |
| memoryItems | 32 |
| memoryFactBytes | 2,048 |
| modelRequests | 8 |
| toolAttempts | 16 |
| retries | 2 |
| elapsedMs | 60,000 |
Byte accounting uses UTF-8 JSON envelopes for input, context and model responses. Tool result accounting charges the larger of the adapter response and normalized result envelope, including retry responses. Usage reports input bytes, peak context, cumulative output and tool-result bytes, requests, attempts, retries, recalled items and adapter-reported tokens.
Structural bounds
String identifiers and revisions are trimmed, nonempty and limited to 256 UTF-8 bytes. Tool arguments are bounded to 4 KiB. Structured session input is limited to depth 8, 4,096 nodes, 32 object keys and 64 array elements. Tool batches have at most 16 requests. History consists of complete alternating learner/assistant pairs. Unknown fields and malformed structures are rejected.
Committed summary events have an 8 KiB envelope limit; stored projections have a 16 KiB limit. Feedback is limited to 2,048 UTF-8 bytes. Summary read responses are bounded to 16 KiB plus 64 bytes and any narrower context limit.
Failure handling
Correct invalid inputs before retrying. If context is unavailable, inspect the source or adapter and avoid claiming it was read. Denied operations require host authorization, not a different prompt. For exhausted limits, reduce the request or context; requests cannot increase host or library ceilings. After cancellation or deadline expiry, reconcile uncertain remote operations before starting a fresh authorized run.
See sessions for provider behavior and architecture for host security duties.