0xBUFF / docs

Contracts and limits

Reference result states, resource ceilings and validation rules.

Planning results

StatusMeaning
completedInstructionPlan with fixed prompts and permitted capabilities
invalid_inputinvalid_host_policy or invalid_request
unavailablemodel_unavailable

Session results

StatusMeaning
completedPlan and optional advisory
incomplete_contextRequired lesson unavailable, tool context incomplete or summary context incomplete
unavailableModel unavailable, provider failure or malformed response
deniedRequired lesson denied
invalid_inputInvalid session input
limit_exhaustedNamed limit or structure bound exceeded
cancelledHost cancellation
deadline_exceededLocal 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.

LimitCeiling
contextBytes65,536
inputBytes16,384
lessonBytes16,384
toolResultBytes32,768
responseBytes16,384
outputBytes65,536
memoryItems32
memoryFactBytes2,048
modelRequests8
toolAttempts16
retries2
elapsedMs60,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.

On this page