Finding / temporal-agent-harness

2026-10-13-temporal-agent-harness-0-5-0-replaces-runner-state-and-authored-run-methods-with-declared-state-and-lifecycle-hoo

0.5.0 replaces runner.state and authored run methods with declared state and lifecycle hooks. Observable state moves from runner.state registration to class-declared agent.state. agent.defn generates the workflow run method and rejects an author-defined run at import; setup/teardown hooks take one-time async work. Required/optional typed initialization is validated before the constructor. Invalid or missing input becomes a non-retryable workflow failure instead of a workflow-task retry loop. Teardown runs after draining close or on cancellation if setup completed, not on failure.

Channel: preview-or-beta (T5 and T6). Half: both. Date: 2026-09-30 (released; implementations 2026-09-25 and 2026-09-29).

Operator consequence: Migrate observable-state declarations, remove the old authored run wrapper and stacked workflow.defn, and move async lifecycle work into agent.setup/agent.teardown. Handle rejected initialization as a terminal start failure. Do not put essential failure cleanup only in teardown. This supplements the message/event migration in section 2; unchanged migrated examples are not alleged to fail.

Receipt

Finding metadata

Run: 2026-10-13-profile-refresh-2026-09-21_2026-10-13-frontier-v0

Finding ID: 2026-10-13-temporal-agent-harness-0-5-0-replaces-runner-state-and-authored-run-methods-with-declared-state-and-lifecycle-hoo

Profile citations

Source links

Primary links, including exact changelog lines when available.