Kernel limits reference

Copy Markdown View Source

Warning: This file is auto-generated by mix ptc.gen_docs from the Kernel limit catalog. Manual edits will be overwritten. Edit lib/ptc_runner/kernel/limit_catalog.ex instead.

Every limit is a positive enforced ceiling; there is no disabled or infinite form. Two documents decide one number. The host document installs the outer ceiling; the application manifest requests the enforced value inside it. With no manifest request the enforced value is the smaller of the effective default listed below and the installed ceiling — which is the installed default below only while the host document does not configure a different one. A manifest may then request any value up to the installed ceiling for the application-narrowable rows — above the effective default as well as below it — and a request above that ceiling is refused rather than clamped.

To raise a limit, edit limits in the manifest. Raising the installed ceiling alone moves the enforced value only while that ceiling is the binding one, and with the installed defaults listed below it is not: a host-only edit leaves the run at the effective default. A run that needs longer than the 30,000 ms run_duration_ms default therefore asks for it in the manifest — ptc.json — and nowhere else:

{ "limits": { "run_duration_ms": 120000, "workflow_timeout_ms": 120000 } }

Only when the application needs a value above the installed ceiling — here, above the 1,800,000 ms run_duration_ms ceiling — does the host document, ptc-host.json, need a matching edit, alongside the same request in the manifest:

{ "install": {}, "limits": { "run_duration_ms": 3600000 } }

The four heap and concurrency rows are the exception: their installed default equals their effective default because live memory is live_provider_tasks multiplied by a heap ceiling. Raising them is a resource decision, so it requires both a host ceiling above the compiled default and a matching manifest request. A limits-only host document — {"install": {}, "limits": {...}} — is enough; it does not need a fabricated provider.

A breached ceiling names itself, its configured value, and the manifest key that raises it, so the error at the point of failure carries this rule too. A request above the ceiling is refused by name, with both numbers.

An agent loop spends two budgets at once, and only one of them is a clock. max_turns bounds the agent protocol: it limits how many model-and-program turns the loop may attempt, and reserves no elapsed time to finish them. The complete run, including active preflight and every provider wait, must fit inside run_duration_ms; the workflow evaluation that owns the loop must also fit inside workflow_timeout_ms. Raising only run_duration_ms leaves the workflow clock as a separate boundary, so a live agent requests explicit values for both from its expected turn count and model latency.

Time values are milliseconds. Heap values are BEAM process heap words, not bytes. The catalog range is the accepted structural range; practical installations should choose ceilings appropriate to their resources and trust boundary.

Application-narrowable limits

NameMeaningUnitEffective defaultInstalled defaultInclusive range
capability_argument_bytesEncoded arguments crossing a capability boundary.bytes262,1444,000,0001–2,592,000,000
capability_result_bytesEncoded result crossing a capability boundary.bytes1,000,00016,000,0001–2,592,000,000
entry_source_bytesWorkflow entry source accepted at the application boundary.bytes262,1444,000,0001–2,592,000,000
evaluation_admission_timeout_msWait for the single subordinate-evaluation lease before execution begins.milliseconds10,000600,0001–2,592,000,000
evaluation_heap_wordsHeap of each subordinate evaluator process.BEAM heap words1,250,0001,250,0001–2,592,000,000
evaluation_history_bytesEach value and the aggregate exact three-value continuation history.bytes1,000,00016,000,0001–2,592,000,000
evaluation_memory_bytesRetained mission definitions across successful turns.bytes2,000,00032,000,0001–2,592,000,000
evaluation_timeout_msOne subordinate mission evaluation, and one interactive REPL form.milliseconds30,000600,0001–2,592,000,000
event_payload_bytesOne trace event payload.bytes262,1444,000,0001–2,592,000,000
live_provider_tasksConcurrent provider callback processes and Kernel-owned parallel Lisp workers.count881–2,592,000,000
mission_capability_callsTotal mission capability calls in one run.count2564,0961–2,592,000,000
mission_capability_calls_per_nameMission capability calls to any one public name in one run.count1282,0481–2,592,000,000
normal_event_bytesAggregate encoded trace events retained under the normal policy.bytes4,000,00064,000,0001–2,592,000,000
normal_event_countTrace events retained under the normal policy.count2564,0961–2,592,000,000
parallel_timeout_msOne pmap or pcalls operation, clamped by the run deadline.milliseconds60,000600,0001–2,592,000,000
protocol_errorsRecoverable agent protocol errors in one run.count645121–2,592,000,000
provider_heap_wordsHeap of each provider callback process.BEAM heap words5,000,0005,000,0001–2,592,000,000
run_duration_msComplete ordinary run after optional provider application admission, including active preflight and Kernel execution.milliseconds30,0001,800,0001–2,592,000,000
subordinate_evaluationsSubordinate mission evaluations in one run.count1282,0481–2,592,000,000
subordinate_source_bytesSource accepted by one subordinate check or evaluation.bytes131,0722,000,0001–2,592,000,000
subordinate_source_checksAdvisory subordinate source checks in one run.count1282,0481–2,592,000,000
terminal_result_bytesEncoded terminal workflow or mission-session result.bytes1,000,00016,000,0001–2,592,000,000
workflow_capability_callsTotal workflow capability calls in one run.count2564,0961–2,592,000,000
workflow_capability_calls_per_nameWorkflow capability calls to any one public name in one run.count1282,0481–2,592,000,000
workflow_heap_wordsHeap of the workflow evaluator process.BEAM heap words8,000,0008,000,0001–2,592,000,000
workflow_timeout_msOne workflow evaluation.milliseconds30,0001,800,0001–2,592,000,000

Installed-only limits

These operational timeouts belong only to the host document. A manifest cannot declare them.

NameMeaningUnitInstalled defaultInclusive rangeEffective identity
doctor_connectivity_timeout_msOne doctor --connect provider health check.milliseconds10,000100–30,000no
local_preflight_timeout_msWhole audited local-preflight phase across selected providers.milliseconds5,000100–30,000yes
provider_cleanup_timeout_msKernel-owned provider cleanup after execution.milliseconds5,000100–30,000yes
selection_validation_timeout_msActive validation of selected provider declarations.milliseconds5,000100–30,000yes