OpenProgram Docs

Durable tool results

Normal screenshots and long text are kept in full; display and model input are managed separately. Payload size alone never turns a successful tool action into a failure. Available resources still apply.

ScenarioCodexClaude CodeOpenCodeOpenProgram
Large screenshotsOutside the text truncation budgetSubject to MCP output token limitsNot verifiedFull images kept. Model adaptation and region inspection are separate work.
Long logsModel-visible text truncated to budgetOversized non-image output saved, path returned; default 25,000 tokens, configurableDefault 2,000 lines or 50 KiB, configurable; full text saved, preview and path returnedFull results kept. Unified previews, search and partial reads are directions.
Large display and event resultsMCP event copies above 1 MiB become text previews and stay successful; no full-retention guaranteeOversized non-image results become session tool-results referencesPreview includes the full-output pathDisplay paged, large text by reference, tool success unchanged
Interruption and recoveryNot verifiedNot verifiedNot verifiedResult and completion record published atomically; the completed-tool frontier is restored, so a persistence failure causes no re-execution

Codex and OpenCode from public source, Claude Code from official documentation, which does not establish its private persistence. Not verified does not mean unsupported. Thresholds describe the cited paths only. Sources: Codex output, Codex events, Codex event threshold, Claude Code MCP, OpenCode output.

Storage

PartRule
Assistant responses, tool resultsContent-addressed blobs, free of the 64 KiB execution-stream frame limit
1 MiBDisplay-page or producer-chunk target. Blob storage does not reject at it.
KeptCheckpoint metadata, reference counts, control-message budgets, content hashes, execution ownership checks
Model input policyUnchanged

Preview cap

  • The cap is the larger of the configured limit (default 30,000 characters) and the 2,000-character minimum, applied before deciding on truncation or a file.
  • A result within the cap is returned once, with no marker and no file.
  • Longer text keeps a non-overlapping head (70% by default) and tail, with a positive elided count. A zero-length tail adds no text.
  • The shared normalizer does this for registered functions and Agent methods.

Full-result files

  • A whole text is kept in the running conversation's directory, at tool_results/<sha256>.txt, named by its content. It is deleted and backed up with the conversation. Outside a conversation (a one-off CLI call) it goes to the profile state directory's tool_results/.
  • The same text is kept once; two different texts never share a name, whichever call or layer saved them. A raw provider call ID can repeat and plays no part in the name.
  • An existing file is reused, since its name says it holds that text. A new one is written to a temporary file and moved into place, so the path is returned only after the complete file is written.
  • Files written earlier under other names stay readable, without migration.

Failure signals

Each tool sets is_error on the existing ToolReturn from its own execution branch. The common normalizer never infers failure from text, so a success beginning Error: stays a success.

ToolError whenStays as it was
execute_codeNonzero Python exit or timeout, keeping stdout, stderr and the exit code or timeoutSuccess; structured sandbox denials; no retry, no repeated subprocess, same backend choice. Timeout adapters keep partial output.
image_analyze, image_generate, mixture_of_agentsProvider or model unavailable, invalid explicit model reference, failed provider call, failed save, all references failed, failed aggregationPartial reference failure keeps its synthesis or single-reference answer. Plain execute keeps its signature and string result; the registered tool is _execute_result.
CanvasValidation, path policy, permission, missing blockSuccessful block bodies. Plain execute as above. Aliases, path admission, cancellation.
ask_user_questionInvalid question, unavailable infrastructure, noninteractive frontend, each with its original textValid answers stay strings; decline and timeout; same decorated AgentTool, name, schema, metadata and interaction manifest. Answers nothing automatically and changes no approval policy.

Schemas, registered names, backend selection, paths, retry budgets, usage labels and cancellation are unchanged throughout.

Pause before dispatch

  • A pause accepted between completed actions is consumed before the next provider or tool dispatch.
  • A planned operation that never started is recorded not_started and stays pending in the Agent resume cursor.
  • A live owner paused before its first effect resumes the original durable admission, with no synthetic model response.
  • A control command changing the execution version during result persistence retries only checkpoint publication under the same attempt fence. The external operation is not repeated.

Reading results at the delegation limit

  • read_conversation stays discoverable and reads an execution id at agent.max_messages. Reading creates no execution, branch or delivery and spends no allowance.
  • Session and ancestor ownership checks still apply, before any wait.
  • Exhausted chains still hide agent; send_message keeps its delivery-time guard. There is no separate cancellation tool.
Acceptance
SubjectHow it is exercised
execute_codeRegistered tool through AgentTool.execute with real successful, failing and timed-out snippets
read_conversationPublic tool catalog resolved at the limit, an owned completed Job read, a foreign Job refused before waiting
Auxiliary providersRegistered wrappers with controlled official-provider transport and owned PNG files; unknown references, unavailable backends, sandbox denial before backend access, cancellation
CanvasRegistered tool on owned files; explicit flags, unchanged text, successful Error: data, plain-call compatibility
ask_user_questionUnavailable input and a controlled frontend answer through AgentTool.execute, with no real prompt

Implementation status

StateItems
ImplementedFull image and text persistence, fresh-store restoration, completion-record reference reuse, corruption detection, everything above
Not implementedUnified model-facing previews and on-demand reads, image-region inspection; existing capabilities need an audit first. Existing reconciliation_required executions are not repaired automatically.
Awaiting acceptanceReal credentials and remote model or image capabilities; installed-App display of execute_code, Canvas and full-result files; the preview-cap host and native checks
Last updated · 2026-11-25