Runtime rules and limits
Check semantic constraints, byte budgets and stable Pigeon error codes.
On this page
The semantic rules JSON with HTTP statuses describes the kind, validation stage, field path and passing and failing values for checks that need more than structural validation. These values illustrate one rule at a time. Use the kind schemas for complete bodies. The error index associates each documented code with its status and affected operations, including shared authorization and admission errors.
Limits
Measure the final canonical body and state separately with new TextEncoder().encode(JSON.stringify(value)).byteLength. Use compact JSON, including braces and ordinary JSON escaping. Measure after defaults, merges, derived values and ID assignment. REST measures actual UTF-8 request bytes before parsing, and MCP measures the embedded write body. Both measure the complete compact application response before protocol framing. Results over budget fail with response_too_large. Use fewer fields or smaller pages where supported.
| Limit | Value | Applies to |
|---|---|---|
| Record body and state | 1 MiB body; 64 KiB state | Enforce separately on the final canonical body and per-account state, including after merge |
| Shared write request | 8 MiB | UTF-8 request body on REST operations and sends and the embedded body on their MCP tools. The RPC frame has room for the Node HTTP header budget beyond the operation body. |
| Shared response | 8 MiB for record detail, lookup, original extraction, reconcile and write receipts. 4 MiB for browse, search and history pages. | Complete compact UTF-8 JSON before REST/MCP framing. Responses over the endpoint budget return response_too_large. Feed and snapshot retain their atomic paging budgets below. |
| Send retry input | 41,209 bytes of compact UTF-8 JSON for the combined URL or text and optional note | Reserve 24,327 bytes of the 64 KiB state budget for the wrapper, retry UUID, Pigeon note, feedback, archive flag and resolution watermark. Oversize returns send_input_too_large at admission. |
| Operation bounds | 1,000 mutations/changes including fan-out; 8 MiB bodies | One account transaction and device-atomic operation |
| Parts per record | 20,000 | 422 structural limit |
| Accepted part-id length | 1–64 ASCII characters from [A-Za-z0-9_.:-] | App-provided canonical part identifiers |
| Core tree depth | 64 by default, policy-overridable | Validate part trees |
| External ids per record | 32 | 422 identity alias bound |
| Venue ID length | 1–200 characters | Opaque venue identity in place and event bodies |
| Quantity unit length | 1–100 characters | Explicit unit on ingredient and grocery quantities |
| Money precision | Up to 4 fractional digits | All {amount, currency} values |
| Recipe fraction conversion | Up to 8 fractional digits | Decimal ingredient quantity recovered from a source fraction |
| Public part operations per patch | 1,000 | Part inserts, moves, removals and field patches in one public patch request |
| Reset addresses per patch | 1–1,000 | Fields, lists or parts handed back to the source in one public patch request |
| Record list page | 1–100, default 50 for owner browse | Record browsing |
| Search input and ranking | query 200 chars; 64 tags; 32 facets; tag value 100 chars; 1–100 results default 100; field weights 100/40/10; title boosts 1,000/300/150 | Search request and ranking |
| Feed page and scan | limit default 100, range 1–500; 4 MiB; 2,000 audience rows plus the last operation's tail; oversized first operation alone ≤8 MiB | Whole-operation pages with invisible-change progress |
| Feed retention | 35 days | Change feed floor and cursor expiry |
| Snapshot bounds | 24 h lifetime; 2 open per connection; 200 records / 4 MiB per page | Bootstrap snapshot resources |
| Reconcile page | 500 records | Restore and expiry recovery |
| Idempotency key retention | 7 days; create ids remain idempotent forever | Retry replay versus durable create deduplication |
| MCP in-flight requests per connection | 4 | Concurrent MCP requests one connection may have open; more is 429, Retry-After: 1 |
| MCP tool deadline | 20 s | Server deadline per tool call, checked before a write transaction starts |
| MCP tool calls per connection | 60 per minute, burst 20 | All tools/call requests from one connection; over is rate_limited |
| MCP tool calls per account | 120 per minute | All tools/call requests across one account's assistants |
| MCP update_save calls per connection | 10 per minute, burst 10 | pigeon.update_save calls from one connection |
| MCP edits per connection per 24 h | 200 applied edits, rolling 24 hours | Applied assistant edits per connection, counted in the write transaction; over is daily_edit_cap_reached |
| MCP edits per account per 24 h | 500 applied edits, rolling 24 hours | Applied assistant edits per account across all assistants |
Semantic rules
The status below describes the semantic check itself. A create with an invalid kind/schema combination can fail earlier with invalid_request. On a public patch, a materialization failure that would be invalid_body on a full update can surface as patch_invalid. Use request and receipt schemas from the operations reference.
Only the verified first-party Workout Notepad connector can attach or change import metadata in meta.legacy_ref. Ordinary writers must supply category titles and completion timestamps for newly completed sets. Existing imported values may be retained unchanged.
| Kind | Stage and field | Result on rejection | Accepts | Rejects |
|---|---|---|---|---|
record | read_selection · fields | 400 invalid_fields | body,provenance | body.title |
record | response · $ | 413 response_too_large | Complete compact UTF-8 JSON at the endpoint byte limit | Complete compact UTF-8 JSON one byte over the endpoint byte limit |
send | admission · state.connector_input | 413 send_input_too_large | Compact UTF-8 JSON of the combined input at 41,209 bytes | Compact UTF-8 JSON of the combined input at 41,210 bytes |
record | state_patch · state_patch | 422 patch_invalid | [{"op":"set","key":"pinned","value":true},{"op":"add_member","key":"tags","member":"trip"}] | [{"op":"add_member","key":"tags","member":"Trip"},{"op":"remove_member","key":"tags","member":"trip"}] |
record | state_patch · state,state_patch | 422 patch_invalid | {"state_patch":[{"op":"remove","key":"pinned"}]} | {"state":{},"state_patch":[{"op":"remove","key":"pinned"}]} |
record | materialized_state · state | 422 invalid_state | {"pinned":true,"connector_key":null} | {"pinned":"yes"} |
send | materialized_state · state.connector_input,state.connector_retry_of | 422 server_owned_field | {"state":{"note":"Review later"}} | {"state_patch":[{"op":"remove","key":"connector_input"}]} |
send | materialized_body · body.feedback | 422 server_owned_field | {"fields":{"via":"file"}} | {"fields":{"feedback":null}} |
guide | materialized_state · state.completed_stop_ids | 422 invalid_state | Add the Part ID of a stop in the resulting guide | Add the ID of a day or an absent stop |
guide | materialized_body · body.days[].stops[].id | 422 patch_invalid | Insert with a new Part ID or reset a removed stop to its original | Reuse a retired stop Part ID for an inserted stop |
record | materialized_state · state | 413 state_too_large | Final compact UTF-8 JSON at 65,536 bytes, including after a removal | Final compact UTF-8 JSON at 65,537 bytes after merging a stale patch |
place | state_patch · state_patch.merge_experience | 422 patch_invalid | {"op":"merge_experience","value":{"version":1,"visits":{"current":{"rating":{"value":null,"updated_at":"2030-07-04T19:00:00-04:00"}}}}} | {"op":"merge_experience","value":{"version":1,"visits":{"current":{"rating":null}}}} |
preferences | materialized_body · home_lat,home_lng | 422 invalid_body | {"home_lat":40.7,"home_lng":-74} | {"home_lat":40.7} |
preferences | materialized_body · pinned_kinds | 422 invalid_body | ["place","recipe","workout"] | ["recipe","recipe","workout"] |
record | dispatch · schema | 422 unsupported_schema | {"kind":"note","schema":"[email protected]"} | {"kind":"note","schema":"[email protected]"} |
place | materialized_body · lat,lng | 422 invalid_body | {"lat":40.7,"lng":-74} | {"lat":40.7} |
event, guide | materialized_body · event schedule | 422 invalid_body | {"all_day":true,"start_date":"2030-07-04","end_date_exclusive":"2030-07-05"} | {"all_day":true,"starts_at":"2030-07-04T19:00:00-04:00","timezone":"America/New_York"} |
event, guide | materialized_body · recurrence.rrule | 422 invalid_body | FREQ=WEEKLY;BYDAY=MO | FREQ=SECONDLY |
product | materialized_body · gtin | 422 invalid_body | 4006381333931 | 4006381333932 |
recipe | materialized_body · steps.*.ingredient_ids | 422 invalid_body | {"ingredients":[{"id":"salt"}],"steps":[{"id":"mix","ingredient_ids":["salt"]}]} | {"ingredients":[],"steps":[{"id":"mix","ingredient_ids":["salt"]}]} |
tab | materialized_body · tuning,chords.*.{strings,fingers} | 422 invalid_body | {"string_count":4,"tuning":["G4","C4","E4","A4"],"chords":[{"strings":[0,0,0,3],"fingers":[0,0,0,3]}]} | {"string_count":4,"tuning":["G4","C4","E4"],"chords":[{"strings":[0,0,0,3,2],"fingers":[0,0]}]} |
tab | materialized_body · sections.*.measures.*.chord_id | 422 invalid_body | {"chords":[{"id":"c1"}],"measure":{"chord_id":"c1"}} | {"chords":[{"id":"c1"}],"measure":{"chord_id":"c2"}} |
tab | materialized_body · sections.*.measures.*.beats.*.notes.*.string | 422 invalid_body | {"string_count":4,"notes":[{"string":1},{"string":4}]} | {"string_count":4,"notes":[{"string":1},{"string":1},{"string":5}]} |
tab | materialized_body · sections.*.measures.*.beats.*.notes | 422 invalid_body | {"rest":true,"notes":[]} | {"rest":true,"notes":[{"string":1,"fret":2,"techniques":[]}]} |
meal | materialized_body · servings,scale | 422 invalid_body | {"servings":"2.5","scale":"1"} | {"servings":"0","scale":"1000.01"} |
session | materialized_body · occurrences.*.sets.*.completed_at | 422 invalid_body | {"state":"completed","completed_at":"2030-07-04T19:00:00Z"} | {"state":"completed"} |
category | materialized_body · title | 422 invalid_body | {"title":"Strength","symbol":"dumbbell"} | {"symbol":"dumbbell"} |
session, program_run | materialized_body · **.mass_kg | 422 invalid_body | {"mass":{"value":"1","unit":"lb"},"mass_kg":"0.45359237"} | {"mass":{"value":"1","unit":"lb"},"mass_kg":"1"} |
workout_version | materialized_body_after_reference_rewrite · body_sha256 | 422 invalid_body | SHA-256 of compact UTF-8 workout JSON with recursively sorted object keys | Digest of the pre-rewrite workout or another version's body |
* | materialized_body · **.id | 422 invalid_body | ["unique-first-id","unique-second-id"] | ["repeated-id","repeated-id"] |
* | create · mutations[].schema | 422 invalid_request | A kind and its exact @1.0 ID | A different or unregistered kind/schema pair |
* | materialized_body · body | 413 body_too_large | Final compact UTF-8 body at its byte limit | Final compact UTF-8 body one byte over its limit |
* | materialized_state · state | 413 state_too_large | Final compact UTF-8 map at its byte limit | Final compact UTF-8 map one byte over its limit |
* | operation_admission · mutations | 413 operation_too_large | Request bytes and mutation count within both limits | Request bytes or mutation count over its limit |
* | create · mutations[].create_id | 422 duplicate_create_id | A different create ID for each intended record | Two creates with the same create ID in one operation |
* | create_or_update · external_ids[].ns | 403 namespace_denied | An alias in the caller’s connection namespace | An alias in another connection’s namespace |
* | typed_reference · Declared record target | 422 create_reference_unavailable | A planned create ID that resolves to a readable live record | A planned create ID that cannot resolve to a readable live record |
* | typed_reference · Declared record target | 422 dangling_reference | A readable live record of the expected kind or a create ID allocated by this operation | A newly introduced typed reference to a missing, unreadable or deleted record |
meal | typed_reference · recipe_id | 422 reference_kind_mismatch | A linked recipe record ID | A grocery list record ID |
* | typed_reference · Declared part selector | 422 reference_part_mismatch | A present part of the expected type and parent | A missing part or one under the wrong parent |
* | typed_reference · Declared workout pin | 422 reference_hash_mismatch | A version with the expected body hash | A version with a different body hash |
* | patch · part_ops[].list | 422 patch_invalid | An insert into note sections | An insert into atomic note tags |
* | patch · reset | 422 reset_no_upstream | An edited source-backed record with a current base | A record authored without an upstream source |
* | patch · reset | 422 reset_not_edited | An address owned by an overlay edit | An unchanged source field |
* | patch · reset | 409 reset_conflict | A current disjoint edit and reset | Overlapping reset and explicit edit intent |
* | patch · reset | 409 reset_dependency | Addresses that reset together without breaking an invariant | Reset of only one side of a required dependency |
* | update_or_patch · base | 409 base_unknown | The revision number paired with its acknowledged operation ID | A number paired with another operation ID |
* | strict_write · base | 409 revision_conflict | A strict edit against the current revision | A strict edit against a stale revision |
* | retry · Idempotency-Key | 422 idempotency_key_reused | The same request under the same account and connection key | Changed mutations under the same live key |
workout_version, operation_log | update_or_patch · body | 422 immutable_record | Create the immutable body once | Change the body after creation |
exercise, exercise_override, modifier_assignment | update_or_patch · Protected operation lineage | 422 lineage_protected | An ordinary edit that retains its existing lineage | A forged operation binding |
* | assistant_write · mutations[] | 422 assistant_edit_shape | Strict body-only patch of a readable editable save | A state replacement under the assistant-only grant |
grocery_list | create · mutations[].kind | 409 grocery_list_exists | Create the first live grocery list | Create another live grocery list for the account |
Error codes
Use the HTTP status and stable code. MCP carries the same application error payload as its REST operation and also has protocol and connection gates. A paid-work limit returns a 429 problem with code: "rate_limited" and retry_after_seconds. REST also sends the same delay in the Retry-After header.
{
"type": "about:blank",
"title": "rate_limited",
"status": 429,
"code": "rate_limited",
"retry_after_seconds": 60
}MCP gates
These are MCP tool errors. A completed JSON-RPC tool call can carry one under isError with HTTP 200. The code is in the code property of the returned problem. Record access uses the same rules as REST.
| Tool code | When it occurs |
|---|---|
assistant_blocked | This assistant client is blocked. |
pro_required | The account has no active Pro entitlement. |
write_scope_required | The assistant lacks a record write grant. |
invalid_arguments | The arguments fail the tool's outer input schema. |
rate_limited | The assistant exhausted a call budget. The tool reports retry_after_seconds. |
temporarily_unavailable | The tool deadline elapsed. |
The MCP HTTP boundary can return 400 for malformed JSON, protocol or header mismatches, 401 for invalid credentials, 403 for an unsupported Origin, 404 for an unsupported method, 413 for an oversized frame, 429 for excess in-flight requests and 503 when the service is unavailable.
Application status and code inventory
| HTTP status | Code | When it occurs |
|---|---|---|
| 400 | cursor_invalid | The feed cursor is malformed or does not authenticate for this connection. |
| 400 | invalid_arguments | The arguments do not match the MCP tool schema. |
| 400 | invalid_cursor | The endpoint's pagination cursor is invalid. |
| 400 | invalid_fields | A field selection is malformed, repeated, unknown or used on a sync read. |
| 400 | invalid_idempotency_key | The sends endpoint requires a UUID idempotency key. |
| 400 | invalid_json | A required JSON request body is missing or malformed. |
| 400 | invalid_limit | The requested page size is outside the endpoint's accepted range. |
| 400 | invalid_request | The input fails the endpoint request schema. |
| 401 | episode_superseded | The credential belongs to a superseded grant episode. |
| 401 | unauthorized | The credential is missing, expired or invalid. |
| 402 | pro_required | This action requires an active Pigeon Pro entitlement. |
| 403 | assistant_blocked | The assistant client is unavailable for this tool. |
| 403 | connection_disconnected | The connection has been revoked or disconnected. |
| 403 | connection_paused | The connection is paused and cannot run this request. |
| 403 | connection_required | The credential lacks the required active connection. |
| 403 | forbidden | The authenticated caller cannot use owner browse. |
| 403 | namespace_denied | The current grant cannot write this external ID namespace. |
| 403 | owner_required | The readable record's owner metadata requires a built-in Pigeon owner credential. |
| 403 | pro_required | This action requires an active Pigeon Pro entitlement. |
| 403 | sapphire_account_required | The credential lacks the required Pigeon account identity. |
| 403 | scope_denied | The caller lacks the permission for the requested action. |
| 403 | write_scope_required | The assistant connection has no active write scope. |
| 404 | not_found | The target is missing or unreadable to the caller. |
| 409 | ambiguous_alias | The proposal matches more than one catalog entry. |
| 409 | base_unknown | The submitted revision pair does not identify an available base. |
| 409 | catalog_redirect_requires_resolution | The matching catalog entry requires a catalog moderation decision. |
| 409 | grocery_list_exists | The account already has a live grocery list. |
| 409 | invalid_deletion_target | The record cannot be deleted through this operation. |
| 409 | pigeon_data_deleting | A Pigeon account data deletion is in progress. |
| 409 | pigeon_owner_mapping_required | The send cannot resolve the required account-owner mapping. |
| 409 | preferences_exists | The account already has a live Pigeon preferences record. |
| 409 | reset_conflict | The reset overlaps a newer edit or other edit intent. |
| 409 | reset_dependency | The reset would break a structural dependency. |
| 409 | reuse_check_required | The source's cached extraction requires a reuse check. |
| 409 | review_changed | The original or its review has moved beyond the submitted revision or candidate. |
| 409 | revision_conflict | Strict edit or review requires a fresh current revision. |
| 409 | send_not_retryable | The caller's send is not an extraction failure with retained input. |
| 409 | source_check_failed | A check required before reusing the source failed. |
| 409 | source_identity_conflict | The submitted source identity conflicts with another source. |
| 409 | source_withdrawn | The original source has been withdrawn. |
| 409 | still_conflicting | The chosen conflict resolution still violates the current merged record. |
| 410 | account_deleted | The account's Hub data was deleted. |
| 410 | cursor_expired | The requested sequence is below the retained feed floor. |
| 410 | cursor_reset | The feed cursor belongs to a different Hub epoch or is above its head. |
| 410 | history_expired | The required historical revision is outside the retention window. |
| 410 | rebootstrap_required | The feed cursor belongs to another permission view. |
| 410 | snapshot_invalidated | The snapshot no longer matches the current account or permission view. |
| 413 | alias_limit | The catalog entry would exceed its alias budget. |
| 413 | body_too_large | The final compact canonical body exceeds its byte budget. |
| 413 | correction_budget_exceeded | The correction exceeds the source review work budget. |
| 413 | operation_too_large | The request or operation exceeds its byte or mutation budget. |
| 413 | proposal_too_large | The correction proposal exceeds its size budget. |
| 413 | publication_work_exceeded | Validating the publication would exceed its work budget. |
| 413 | reference_work_exceeded | Reference discovery, rewrite or patch traversal exceeds its work budget. |
| 413 | release_budget_exceeded | Publishing the catalog would exceed the release size budget. |
| 413 | response_too_large | The complete response exceeds the endpoint byte budget. |
| 413 | send_input_too_large | The compact URL or text and optional note cannot fit in the reserved retry state. |
| 413 | state_too_large | The final compact state map exceeds 64 KiB. |
| 422 | assistant_edit_shape | An assistant-only writer submitted something other than a supported strict body patch. |
| 422 | base_required | A revision base is required for the requested edit. |
| 422 | body_identity_changed | The mutation changed the identity of the record body. |
| 422 | body_invalid | A validated body or conflict resolution violates its body invariants. |
| 422 | correction_invalid | The proposed correction does not name a valid source edit. |
| 422 | create_reference_unavailable | A typed target allocated by this operation cannot become a readable live record. |
| 422 | dangling_reference | A new typed link points to a deleted or unavailable target. |
| 422 | duplicate_create_id | Two create mutations in the same operation use the same create ID. |
| 422 | idempotency_key_required | The original-review write is missing its idempotency key. |
| 422 | idempotency_key_reused | The account and connection already used the key with another request. |
| 422 | immutable_record | The mutation attempts to change the body of an immutable record. |
| 422 | invalid_body | The kind body violates structural or semantic validation on write. |
| 422 | invalid_choice | The requested conflict resolution choice is invalid. |
| 422 | invalid_crosswalk | A catalog provider or external ID is invalid. |
| 422 | invalid_cursor | The endpoint's pagination cursor is invalid. |
| 422 | invalid_id | The ID is not a valid UUID. |
| 422 | invalid_operation | The operation is invalid, for example when its required idempotency key is empty. |
| 422 | invalid_page | The catalog release page parameters are invalid. |
| 422 | invalid_proposal | The catalog entry proposal failed validation. |
| 422 | invalid_reconcile | The submitted reconciliation input cannot be processed. |
| 422 | invalid_request | The input fails the endpoint request schema. |
| 422 | invalid_revision | The catalog entry revision is invalid. |
| 422 | invalid_state | A well-known state value or a newly marked guide stop is invalid for the resulting record. |
| 422 | invalid_url | The send URL cannot be admitted. |
| 422 | lineage_protected | A write forged, changed or removed protected operation lineage. |
| 422 | patch_invalid | The patch shape, body, addressed part or state intent is invalid. |
| 422 | pre_tombstone_fanout_limit | Required dependent-record flags would exceed the atomic deletion fanout budget. |
| 422 | pre_tombstone_scan_limit | The dependent-record scan would exceed the atomic deletion scan budget. |
| 422 | record_identity_changed | The mutation would change the existing record identity. |
| 422 | reference_hash_mismatch | The referenced workout version does not match the expected digest. |
| 422 | reference_kind_mismatch | The typed reference points to a record of the wrong kind. |
| 422 | reference_part_mismatch | The required referenced part, type or parent does not match. |
| 422 | reset_invalid | A reset address cannot be resolved as a supported field, list or part. |
| 422 | reset_no_upstream | The reset target has no upstream source. |
| 422 | reset_not_edited | The reset address has no owner edit to return to source. |
| 422 | server_owned_field | A send mutation attempts to write a server-owned value. Omitted server-owned values survive replacement. |
| 422 | too_many_external_ids | The final record exceeds the external ID limit. |
| 422 | unsupported_schema | The record kind or exact wire schema is unsupported. |
| 422 | webhook_events_invalid | The subscription has unsupported event types. |
| 422 | webhook_url_invalid | The destination fails the webhook URL requirements. |
| 422 | webhook_url_private | The destination is not a public webhook endpoint. |
| 429 | daily_edit_cap_reached | The operation would exceed a rolling assistant edit cap. The problem includes resets_at. |
| 429 | rate_limited | The connection, route or paid-work budget is exhausted. Honor Retry-After where supplied. |
| 429 | snapshot_rate_limited | The connection exhausted its snapshot creation allowance. |
| 503 | history_corrupt | The Hub could not reconstruct a consistent historical revision. |
| 503 | hub_not_ready | The account or Hub is not ready to serve the operation. |
| 503 | identity_unavailable | Personal access token verification is temporarily unavailable. |
| 503 | internal_error | An unexpected Hub failure prevented the request from completing. |
| 503 | ledger_unavailable | The Hub could not make its durability ledger available. |
| 503 | temporarily_unavailable | Pigeon could not complete the tool call before its deadline. |