Agency

Known API-contract issues

This is an evidence record, not an alternate intended API. The reference documents current behavior; Stage 2 changes inaccurate docstrings without changing execution.

Priority Demonstrated discrepancy Evidence and consequence
1 Pending agdata/agtask resolution loses the agerror/agcanceled subtype agdata._resolve copies only _data. The synthetic error example in results demonstrates it without infrastructure; submission tests establish that run returns bare agdata. Callers must inspect the reserved error field; subtype-based cancellation detection and AgError-on-output promises do not hold. Decide a future stable error/cancellation inspection API.
1 No automatic skill input validation agskill, engine and native loop prepare inputs without calling validate_input. Skill schema tests test explicit calls, not automatic submission enforcement. Invalid inputs can reach the model. Decide whether validation belongs at admission/materialization or stays caller-owned.
2 Initial orchestrator resource config is omitted GlobalAgentOrchestrator.init creates agResourcePool without agconfig; pool construction makes defaults. Supplied idle resource limits do not initialize the global pool. Explicit change_config propagates them. Requires a runtime fix and constructor test separately.
2 Advertised timeouts are not overall execution deadlines agtool.call ignores timeout; host/sandbox MCP dispatch calls synchronously. Orchestrator.flush ignores timeout_s. Result wait timeout applies to its immediate future and shutdown timeout does not bound every cleanup. Choose/remove/enforce timeout meanings individually; don’t infer hard cancellation.
3 Process concurrency update does not resize executor orchestrator construction/change_config fixes ThreadPoolExecutor max_workers at construction. Increasing admission ceiling later can still queue in the original executor. Choose a documented immutable setting or implement safe resizing.
3 Configuration replacement has construction-time boundaries Agent.change_config does not change chosen harness; output properties can change without updating the existing output mount; sandbox change_config does not rebuild image/mount selection; logger retains config/open connection. Decide which fields should be immutable versus explicitly recreated.
3 Recovery and schema typing are partial agschema validates selected shapes; preparation/recovery catch exceptions and retain values. agbinary may remain a path after failed recovery. The earlier agpath docstring referred to a removed plain-str field handler; current plain-str outputs are not dereferenced. Applications requiring strong types must explicitly check before/after execution.

Stage 3 findings requiring a code decision

Priority Current behavior Evidence / decision
1 False filesystem commit return is ignored by AgentEngine.execute Engine tests commit exceptions but does not check commit’s bool. Decide whether false must fail before publishing session/output. Current docs promise ordering of invocation, not durable capture for every success.
2 Native and PTY inactivity can return ok=True with partial/empty output Native adapter, PTY execution, and timeout-as-completion tests. Decide whether inactivity needs a distinct terminal status; raw outputs can otherwise appear successful.
2 Native pause is not excluded from its separate progress deadline Native’s 300-second polling deadline does not extend for pause; PTY does. Source-only finding: add/choose the supported long-pause semantics rather than promising an unbounded pause.
3 Failed-daemon attempt reader and callback drain have different limits Engine watchdog can abandon a blocked reader thread; token retirement waits for admitted callbacks. Decide acceptable leak/drain deadlines without violating attempt fencing.

Architecture explains the current package design and execution boundaries. These findings remain unresolved runtime choices.

Evidence boundaries

Ordering, nested dependencies, timeout/async waiter protection, cancellation commit races, redirect request identity/fallback and stable fork are covered by the existing agdata, submission, transaction fence, redirect, lifecycle and workflow tests. These use local fixtures/mocked engines; they do not establish live external CLI/model behavior.

The input-validation omission, initial resource-config omission, executor resizing boundary and exact portable checkpoint restrictions were traced through source. No live model, Linux ptrace container, privileged ZFS/CRIU setup or Perfetto asset build was performed on the macOS ARM64 verification host.