Chinese

Durable tool results and coding-agent comparison

Preserve normal screenshots and long text in full. Manage display and model input separately. Payload size alone should not turn a successful tool action into an execution failure. Database and available-resource constraints still apply.

ScenarioCodexClaude CodeOpenCodeOpenProgram design
Large screenshotsImages do not consume the text truncation budgetImage results remain subject to MCP output token limitsImage handling not verified in this comparisonPreserve full images; model adaptation and region inspection are separate design work
Long logsTruncate model-visible text to its budgetPersist oversized non-image output to a file and return its path; configurable default of 25,000 tokensConfigurable defaults: 2,000 lines or 50 KiB; save full text and return preview plus pathPreserve full results; model-facing previews, search and partial reads are design directions
Large display/event resultsMCP event copies above 1 MiB become text previews while retaining success; this does not guarantee full-result retentionOversized non-image results become references to session tool-results filesPreview includes the full-output file pathPage display content and reference large text results without changing tool success
Interruption and recoveryFull recovery guarantees not verified hereFull recovery guarantees not verified hereFull recovery guarantees not verified herePublish result and completion records atomically; restore the completed-tool frontier to avoid re-execution caused by this persistence failure

Codex output · Codex events · Codex event threshold · Claude Code MCP · OpenCode output

Codex and OpenCode statements come from public source; Claude Code statements come from official documentation and do not establish its private persistence implementation. Unverified does not mean unsupported. Thresholds describe the cited paths, not universal limits for every tool.

Current design

Retain checkpoint metadata, reference counts, control-message budgets, content hashes and execution ownership checks. Complete assistant responses and tool results are stored as content-addressed blobs without the 64 KiB pending-message limit. Blob storage does not reject at 1 MiB; that value remains a display-page or producer-chunk target. This does not change model input policy.

Implementation status

Implemented and verified: full-size image/text persistence, fresh-store restoration, completion-record reference reuse and corruption detection. The implementation gate records 1,422 passing tests and one skipped test. Not implemented in this change: unified model-facing previews and on-demand reads, or image-region inspection; existing capabilities require audit first. Existing reconciliation_required executions are not automatically repaired, and the original session screenshot has not been rerun.

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 as not started and remains pending in the Agent resume cursor. A live owner paused before its first effect resumes the original durable admission without a synthetic model response. A control command changing the execution version during result persistence retries only checkpoint publication under the same attempt fence; it does not repeat the external operation.

Python execution outcomes

The execute_code public tool marks a nonzero Python exit or a timeout as an error while retaining stdout, stderr, and the observed exit code or timeout. Successful code remains successful. Local sandbox denials retain their existing structured metadata. This uses the existing ToolReturn result contract and does not add a retry, change backend selection, or repeat the subprocess. Acceptance calls the registered tool through AgentTool.execute with real successful, failing, and timed-out Python snippets; backend-specific timeout adapters retain partial output. Source verification and installed-App display acceptance are separate.

Read existing Agent results at the delegation limit

job_output remains discoverable and usable when the current collaboration chain reaches agent.max_messages. Reading an existing Job result creates no new execution, branch or delivery and consumes no delegation allowance. The existing session and ancestor ownership checks still guard result access; exhausted chains continue to hide agent, while send_message retains its delivery-time budget guard. Acceptance resolves the public available tool catalog at the configured limit, reads an owned completed Job through AgentTool.execute and refuses a foreign Job before waiting. No new cancellation tool is introduced. Independent reviews and the final combined gate bind implementation evidence separately.

Auxiliary provider outcomes

The registered image_analyze, image_generate and mixture_of_agents tools retain the success or failure status already determined by their local execution branches. A local outcome function returns the existing ToolReturn with an explicit is_error flag; registered AgentTool.execute receives that outcome. The public plain execute functions keep their original string results and signatures. Provider and model unavailability, invalid explicit model references, failed image-provider calls, image-save failures, all-reference failure and failed aggregation produce typed error results. A successful model answer remains successful even when its text begins with Error:. Partial reference failure retains the existing successful synthesis or single-reference behavior. Schemas, registered names, source modules, backend selection, paths, retry budgets, usage labels and cancellation semantics stay unchanged. The common normalizer does not infer failure from text. Acceptance exercises the actual registered wrappers with controlled official-provider transport responses and owned PNG input/output, then verifies unknown references, unavailable backends, sandbox denial before backend access and cancellation. Controlled provider replies verify local execution behavior; live credentials and remote model/image capabilities remain separate acceptance gates.

Canvas and CLI browser failure signals

Canvas and agent_browser register an internal result callable that returns the existing ToolReturn protocol. Their plain Python execute callables keep their signatures and string returns. Existing explicit Canvas validation, path-policy, permission and missing-block failures, and existing agent_browser argument/session/URL-policy, missing-dependency, timeout, missing-binary and nonzero-subprocess failures carry is_error=true. Successful block bodies and successful CLI stdout remain successful even when they begin with Error:. Result text does not determine failure. Schemas, aliases, path/URL admission, CLI arguments, cancellation and session lifecycle retain their current behavior; browser close retains its existing best-effort cleanup contract. Acceptance invokes registered tools on owned files and controlled CLI responses, confirms explicit failure flags and unchanged text, and checks successful Error:-prefixed data and plain-call compatibility. Independent specification and fresh quality review have passed. Final combined verification and installed-interface acceptance remain pending; the controlled checks do not use a real provider, user browser, App or terminal.

Unavailable question input

The registered ask_user_question tool returns a typed error for its existing invalid-question, unavailable-infrastructure and noninteractive-frontend branches. Each diagnostic retains its original text. The module still exports the same decorated AgentTool object, with the same registration name, schema, metadata and interaction manifest. Valid answers remain strings; decline and timeout handling retain their existing behavior. This does not answer a question automatically or change permission and approval policy. Public acceptance checks unavailable input and a controlled frontend answer through AgentTool.execute without sending a real user prompt.