# Hardi agents V2 — programs

Contract: 2. Revision: 2026-11-03. Status: available to active verified Hardi accounts; Free, Plus and Pro retain their native limits.

The batch syntax in this guide is for the CLI. ChatGPT uses the separately named operations in the MCP guide, with the same native checks and real IDs from earlier calls.

# Resumable bounded programs

A program is a private CLI orchestration file, not a server background job. Format: schemaVersion 1, steps with unique lowercase IDs and one to ten shared actions each; at most twenty-eight steps. Run hardi program check --file program.json, then hardi program run four-weeks --file program.json --json. Inspect hardi program status four-weeks; resume with hardi program resume four-weeks.

Each step is atomic; the complete program is not atomic across steps. The CLI reads omitted current versions immediately before a new step and preserves explicit versions. It persists the exact request before sending it, finds retained receipts after uncertainty and never uses a new key to recover an unknown outcome. Only after a definitive conflict, expired key, quota/admission refusal or disabled-write response, an explicit --replan can prepare a new intent for that rejected step; unchanged explicit versions remain explicit. An uncertain outcome is never replanned.

Use a string $step:step-id:ref in an ID field to refer to an earlier step result. The next step waits for that real receipt. Local refs still work inside one batch. program simulate previews the next pending step only, never claims to simulate dependent later steps and reserves nothing. Admission backoff preserves the same request ID. Quota and permission failures stop the program and preserve applied earlier steps.

Private state retains action content and receipts outside repositories, under the same OS-user protections as recovery. It contains no credentials or model reasoning. Logout or profile removal erases it. No telemetry or model calls are added; per-program call counts, response bytes and elapsed time are local diagnostics.


calendars:create creates private personal calendars through native quotas, and authorizes this connection to use its own created calendars. calendar.create accepts ref, name, timelineType (dated/fixed), durationWeeks for fixed and optional description. Later actions in the same atomic batch can use calendarRef; earlier-step receipts can supply calendarId. Creation never enables sharing. Conditional actions:undo can retract only this connection's verified calendar creation, after dependent actions are reversed and only when no later protected use exists. CLI: hardi calendars create --name 'Twelve weeks' --timeline-type fixed --weeks 12 --json. hardi calendars list is paginated; follow nextCursor with the same page size. Explicit all_personal calendar access is dynamic and excludes Teams, followed, archived and foreign calendars.

After reconnection, hardi program resume <name> --adopt-connection explicitly rebinds only the same account and issuer. Applied and uncertain receipts are checked before re-binding; original prepared steps and request IDs remain intact. Program check derives conditional scope requirements from the shared server rules, but native content and remaining rights are always verified at execution.
