Guides

Long-Running Goal Execution

Canonical UAIX operating recipe for long-running, interruptible, goal-driven work using Follow Goals runtime overlays, authoritative .uai checkpoints, UAI-1 task-status packets, blockers, handoffs, memory proposals, final reports, and reviewed write-back.

  • Record UAIX-DOC-3295
  • Path /en-us/guides/long-running-goal-execution/
  • Use Canonical public record

Document status

Public standards page Published on UAIX as part of the current public standards record
Code
UAIX-DOC-3295
Surface
Guides
Access
Public and linkable

How to use this page

Use this guide to keep long-running agent goals interruptible, checkpointed, review-gated, and written back into authoritative UAIX memory rather than hidden runtime state.

Use beside

Follow Goals GuideProject Handoff.uai File GuideOpenAI/Codex Guide

Interruptible Goal Work

Checkpoint long-running work without turning UAIX into a runtime

Use this guide to compose .uai memory, Follow Goals overlays, UAI-1 agent packets, checkpoints, blockers, handoffs, final reports, and reviewed write-back for work that may pause or resume.

Runtime

External runtimes execute

Codex, OpenAI agents, local agents, workflow engines, or humans own execution, tools, approvals, traces, retries, and managed runtime state.

Memory

UAIX files stay authoritative

Runtime state becomes durable project truth only after review and write-back into .uai records, docs, code, tests, release notes, roadmap state, or machine artifacts.

Packets

Checkpoint with existing UAI-1 profiles

Use task-status, blocker, handoff, memory-proposal, final-report, and correction packets instead of inventing a new long-running schema.

Boundary

No hosted orchestration claim

This guide is not a scheduler, hosted memory database, official adapter, SDK, CLI, certification program, automatic repository writer, hosted importer, or automatic sync surface.

Use beside

Follow Goals GuideRuntime objective overlay for environments that use /goal or structured goal prompts.Project HandoffAuthoritative repo-local memory and handoff boundary..uai File GuideTyped memory files used for checkpoints and write-back.OpenAI/Codex GuideUse OpenAI and Codex runtimes without moving durable memory into the runtime.Coding Agents GuideCode-bearing resume rules and next-recursive prompt boundaries.Context Budget GuideHot/cold memory promotion and compaction rules.AI Memory Package WizardConfiguration-specific package guidance for Follow Goals, multi-agent communication, and code-bearing continuation.ValidatorUse current validator behavior only where checks are actually implemented.ChangelogDated public release trail for the guide-level update.
Goal HandoffCopyable long-running goal frame
/goal Finish the next bounded work chunk using authoritative UAIX memory, not the last chat turn.

Success criteria:
- Complete the bounded subtask or emit a blocker.
- Run targeted checks or name skipped checks with reasons.
- Record checkpoints, blockers, handoffs, memory proposals, and final evidence with existing UAI-1 profiles where applicable.
- Write accepted facts back to authoritative .uai files after review.

Feature/improvement focus:
- Keep long-running work interruptible, review-gated, and resumable.

Code/source changes:
- Regenerate next-recursive-prompt only after authoritative write-back for code-bearing scopes.

Automated tests/checks:
- Use .uai/test-plan.uai, focused touched checks, final-report evidence, and skipped-check reasons.

Use this when a receiver can run /goal, while durable memory remains in UAIX files.

Long-running goal execution keeps interruptible agent work visible, resumable, and review-gated. Use this guide when a project combines UAIX .uai memory files, a Follow Goals-style runtime objective, UAI-1 task packets, checkpoints, blockers, handoffs, final reports, and authoritative write-back.

This is a documentation and evidence pattern. The runtime, IDE, workflow engine, human operator, or agent platform still owns execution, scheduling, tool access, approvals, traces, and managed memory.

What this page is for

  • Plan long work that may be interrupted, resumed, delegated, paused, or completed across more than one agent session.
  • Keep the active runtime goal small while durable project memory stays in AGENTS.md, .uai/readme.human, typed .uai records, and reviewed public or local evidence.
  • Map checkpoints, blockers, handoffs, memory proposals, and final reports into existing UAI-1 agent packet profiles without inventing a new schema.
  • Give humans a clear review path before any runtime result becomes accepted project truth.

What this is not

  • Not a UAIX-hosted runtime, scheduler, queue, daemon, workflow engine, memory database, vector store, trace store, or orchestration service.
  • Not an official OpenAI adapter, native OpenAI goal field, SDK, CLI, hosted importer, repository writer, automatic LLM Wiki sync, certification, endorsement, or conformance program.
  • Not permission to run tools, deploy, publish, authenticate, access secrets, mutate memory, widen public support claims, or bypass local policy.
  • Not a reason to copy raw traces, private logs, hidden prompts, secrets, or unreviewed generated summaries into durable memory.

Layer split

Layer Role Durable? Examples Rule
UAIX authoritative memory Current operating truth, constraints, progress, decisions, test posture, owners, and next action. Yes, when reviewed and accepted. AGENTS.md, .uai/readme.human, .uai/short-term-memory.uai, .uai/progress.uai, .uai/current-state.uai, .uai/next-actions.uai, .uai/decisions.uai, .uai/constraints.uai, .uai/test-plan.uai. Authoritative over runtime summaries.
Follow Goals runtime overlay Concise active objective for a runtime that benefits from structured planning. No, not by itself. .uai/exports/follow-goal.json, /goal prompt, structured Goal / Success criteria / Constraints block. Generated from authoritative memory; does not replace it.
UAI-1 agent packets Portable status, blocker, handoff, memory proposal, final report, correction, and validation evidence. Review record, not execution itself. uai.agent.task-status.v1, uai.agent.blocker.v1, uai.agent.handoff.v1, uai.agent.memory-proposal.v1, uai.agent.final-report.v1. Records evidence and boundaries while runtime executes elsewhere.
External runtime Executes tools, code edits, checks, approvals, traces, orchestration, retries, and session state. Runtime-specific. OpenAI agents, Codex, coding agents, Carcinus, LocalEndPoint, MCP/A2A clients, internal workers, or human/operator loops. Runtime output becomes UAIX memory only after review and write-back.
Cold memory / graph / archive Provenance, source history, branch exploration, old reports, rejected paths, and long research. Yes as background evidence. LLM Wiki, AIWikis archive, graph projection, source snapshots, transfer manifests. Not active project truth until reviewed and promoted.

Canonical long-running goal pattern

  1. Load the handoff front door and required .uai files.
  2. State the goal, success criteria, hard boundaries, verification plan, expected touchpoints, and checkpoint cadence before broad work.
  3. Run one bounded slice in the external runtime.
  4. Emit a checkpoint packet when meaningful state changes or interruption is likely.
  5. Emit a blocker packet when the same obstacle cannot be resolved safely.
  6. Emit a handoff packet when another agent, human, runtime, or future session must continue.
  7. Emit memory-proposal packets for candidate durable facts; do not write them as truth until reviewed.
  8. Emit a final-report packet when the goal completes or is explicitly closed.
  9. Write accepted results back into authoritative records, then archive or cite raw runtime material as evidence only where useful.

Required read order

  1. Current human instruction and local policy.
  2. AGENTS.md or .uai/readme.human as the project front door.
  3. .uai/memory-maintenance.uai, protected active instruction anchors, and .uai/short-term-memory.uai.
  4. .uai/startup-packet.uai, .uai/system-profile.uai, and .uai/receiver-brief.uai when present for Project Handoff.
  5. .uai/constraints.uai, .uai/progress.uai, .uai/decisions.uai, .uai/test-plan.uai, and code-scope records when the work touches code.
  6. .uai/exports/follow-goal.json only when the receiver environment uses Follow Goals or /goal.
  7. Active Agent File Handoff intake before unrelated broad work.
  8. Cold-memory or LLM Wiki sources only after the compact current memory and boundaries are clear.

File mapping for checkpoints

Need Authoritative file Update trigger Notes
Compact active working state .uai/short-term-memory.uai After meaningful work, handoff, deployment, intake processing, blocker change, or compaction. Keep concise and current.
Completed/verified work .uai/progress.uai After meaningful work segment, test pass, blocker resolution, or release-prep step. Record what changed and what evidence exists.
Current readiness/posture .uai/current-state.uai After test run, deployment, blocker change, or status change. Include readiness, active blocker state, and current posture.
Ordered queue .uai/next-actions.uai When priority, next step, owner, or blocker state changes. Include exact next action.
Durable decision .uai/decisions.uai When accepted, replaced, reversed, or proven stale. Include reason, evidence, owner, and replacement path.
Constraints and red lines .uai/constraints.uai When support boundary, secrets policy, destructive-operation limit, or authority changes. Do not weaken through runtime state.
Verification surfaces .uai/test-plan.uai When targeted checks, full-sweep triggers, or acceptance evidence change. Name skipped checks with reasons.
Code-bearing resume .uai/next-recursive-prompt.uai After accepted code-bearing work and authoritative write-back. Derived hot memory only; not a second source of truth.
Risk and approval .uai/risk-register.uai and .uai/owners.uai When risk, reviewer, owner, or approval boundary changes. Required for high-risk or owner-gated work.
Runtime goal overlay .uai/exports/follow-goal.json When the receiver environment uses /goal or equivalent goal state. Configuration-specific runtime view; not durable truth.

Runtime packet mapping

Situation Preferred packet Required behavior
Generic async status uai.task.status.v1 Use when only task ID, state, subject, progress, status message, and result references are needed.
Agent communication status uai.agent.task-status.v1 Use when correlation-linked progress, percent complete, current action, support boundary, idempotency, timeout, fallback, or UTC estimates matter.
Unsafe or underspecified continuation uai.agent.blocker.v1 Use for authorization, access, ambiguity, unsupported capability, system fault, validation failure, secret, destructive-action, or boundary conflict.
Durable fact candidate uai.agent.memory-proposal.v1 Use only for proposed durable facts; keep task execution separation explicit.
Ownership transfer uai.agent.handoff.v1 Use when another actor, runtime, or human should continue; include target actor and exact next action.
Completion evidence uai.agent.final-report.v1 Include summary, files changed, new files, tests run, skipped checks, blockers, risks, validation evidence, proposed memory updates, skipped memory updates, and exact next action.
Correction uai.agent.correction.v1 Use to preserve immutable history when prior packets or status statements need correction.

Checkpoint cadence

  • Checkpoint after each meaningful source change, release step, migration step, or reviewed evidence update.
  • Checkpoint before context compaction, long waits, tool handoff, process interruption, or switching agents.
  • Checkpoint before expanding authority, changing protected memory, publishing, deploying, or touching secrets-adjacent systems.
  • Checkpoint when verification status changes from not-run to pass, fail, skipped, or blocked.
  • Do not checkpoint so frequently that noise replaces progress; each checkpoint should answer what changed, what remains, what evidence exists, and what can safely resume.

Minimum checkpoint payload: task or correlation ID, current action, completed work, evidence produced, tests/checks run, tests/checks skipped and why, active blockers, risks, files or routes changed, memory updates proposed, memory updates intentionally skipped, exact next action, and a UTC timestamp.

Interruption and resume flow

  1. Stop on a safe boundary: save files, avoid half-written releases, and do not leave destructive operations pending.
  2. Write a task-status checkpoint with UTC time, current slice, completed work, changed files, checks, blockers, and resume command or prompt.
  3. Update .uai/short-term-memory.uai and .uai/progress.uai only with accepted or clearly marked candidate facts.
  4. On resume, reload current instruction, front-door memory, active intake, and the latest checkpoint before using old chat context.
  5. Summarize the resumed state and ask for human input only when the blocker cannot be resolved from visible evidence and a reasonable assumption would be risky.

State flow: LoadAuthoritative -> BuildRuntimeGoal -> Working -> Checkpointed -> Working. If approval, context, capability, or evidence is missing, move to Blocked. If another actor should continue, move to Handoff. When done criteria are met, move to Finalized, then WriteBack, then stop.

Code example
Resume task <task_id> using the authoritative handoff bundle, not the last chat turn.
Load AGENTS.md, .uai/readme.human when present, .uai/memory-maintenance.uai, identity, world-context, active instruction anchors, short-term-memory, current-state, progress, next-actions, constraints, decisions, and test-plan.
If code-bearing, also load .uai/next-recursive-prompt.uai only as derived hot memory.
Reconstruct:
- last accepted checkpoint
- unfinished subtask
- active blockers
- required checks
- exact next action
If any conflict is unresolved, emit uai.agent.blocker.v1 instead of guessing.

Conflict-resolution ladder

  1. Human explicit artifact-and-operation authorization controls protected anchor mutation.
  2. .uai/memory-maintenance.uai, .uai/totem.uai, .uai/taboo.uai, and .uai/talisman.uai govern memory lifecycle and protected boundaries.
  3. AGENTS.md or .uai/readme.human provide the entry record and local project instructions.
  4. Authoritative .uai files control current project truth.
  5. Current public UAIX pages, code, tests, release notes, roadmap state, validator evidence, and machine artifacts govern public support claims.
  6. Follow Goals exports, next-recursive-prompt, task-status packets, runtime summaries, graph projections, and cold-memory notes are subordinate unless reviewed and promoted.
  7. Old chats, raw logs, old reports, unreviewed archive notes, and retrieval answers are source leads only.

If conflict remains, stop broad work, emit a blocker, name the conflicting artifacts, name the safest next review action, and do not silently merge or overwrite durable memory.

Code-bearing scope rules

  • For code, automation, executable workflows, or code-like artifacts, require architecture, coding standards, constraints, progress, test plan, and next-recursive prompt records before broad editing.
  • Map expected touchpoints, risks, and targeted tests before changing code.
  • Run focused syntax, unit, integration, static, package, locale, route, or browser checks that match the touched behavior.
  • Never claim deployment, publication, package upload, automatic repository writes, SDK, CLI, official adapter, certification, or endorsement without evidence.

Non-code scope rules

  • For writing, research, governance, localization, SEO, policy, or planning, require source notes, current public surface, support-boundary review, and final evidence path.
  • Do not synthesize normative standards text, translations, or policy authority without review.
  • Use no-op/source-validation only when there is no concrete feature, bug, improvement, test/check, package, or publication work left to perform and state the stop condition clearly.
  • Keep human-facing explanations in .human files, AI instruction text in .uai files, and structured data in .json files inside .uai/.

Hot context and cold memory

Hot context is what the next agent should load by default: current state, constraints, decisions, active blockers, next actions, targeted checks, and recent accepted outcomes. Cold memory is recoverable provenance: long reports, old chats, raw traces, research snapshots, archived intake, and bulky rationale. Cold memory can inform future work, but it becomes active only when a reviewed fact is promoted into current records.

Hierarchical agent pattern

A long-running project can use a coordinator plus specialist workers, but UAIX records the handoff, not the live hierarchy. The coordinator owns goal framing, read order, conflict checks, checkpoint review, memory proposals, and final reporting. Worker agents own bounded tasks and return task-status, blocker, handoff, or final-report packets. Human review still gates protected memory, public claims, publishing, and deployment.

Fresh-context evaluation

When a fresh agent evaluates the work, it should load the latest authoritative files, ignore private chat memory unless explicitly provided, compare claims against source evidence, run or review targeted checks, and decide whether the previous output is accepted, rejected, partially accepted, or needs a blocker. Fresh context is useful because it catches drift that a long session may normalize.

Wizard setup

  1. Open the AI Memory Package Wizard.
  2. Select Project Handoff or another code/project package that matches the work.
  3. Populate startup packet, receiver brief, constraints, progress, decisions, test plan, and code-scope files from visible evidence.
  4. Enable Follow Goals only when the receiver uses /goal or an equivalent runtime goal overlay.
  5. Ensure .uai/exports/follow-goal.json names one active goal, success criteria, hard boundaries, verification, checkpoint cadence, and write-back targets.
  6. After a completed goal, show a Suggested Next /goal Prompt when the current work started from /goal or Follow Goals; otherwise show a Suggested Next Prompt with the same concrete next-work discipline.

Validation expectations

  • Warn when an active goal lacks success criteria, constraints, verification, checkpoint cadence, or write-back targets.
  • Warn when a checkpoint lacks UTC time, current state, completed work, remaining work, blocker status, evidence, or resume condition.
  • Warn when a memory proposal is written as accepted truth before review.
  • Warn when a final report omits changed files, checks, skipped checks, blockers, package/publication status, memory updates, or a visible next prompt.
  • Warn when public copy implies UAIX-hosted execution, automatic sync, official adapters, SDK, CLI, certification, endorsement, or production publication without evidence.

If the current validator cannot enforce one of these expectations yet, state it as documentation guidance or future validator work. Do not describe it as current validator behavior until schemas, examples, validator checks, conformance evidence, and release notes agree.

Copyable prompts

Prompt A: Parent goal runtime export

Code example
Goal:
Finish the next bounded work chunk for this project without widening support claims or violating hard constraints.

Success criteria:
- The bounded subtask is complete or a concrete blocker is recorded.
- Targeted checks are run or explicitly skipped with a reason.
- Accepted facts are written back to authoritative UAIX files.
- Runtime status, blockers, handoffs, memory proposals, and final evidence are packetized where applicable.
- A concrete next action is left for continuation.

Constraints:
- Authoritative truth is AGENTS.md plus the listed .uai files.
- Do not treat old chats, raw traces, graph retrieval, or large reports as current truth.
- Do not promote secrets, tokens, credentials, private keys, hidden prompts, or unreviewed cold-memory claims.
- If approval, context, capability, or evidence is missing, stop with a blocker.

Verification:
- Read .uai/test-plan.uai.
- Run targeted checks or name skipped checks.
- Use final-report evidence before completion.
- Write accepted changes back to authoritative files only after review.

Prompt B: Subtask execution prompt

Code example
Read AGENTS.md first, then .uai/readme.human if present, then the relevant .uai files for this subtask.
Summarize current truth, hard constraints, expected touchpoints, and targeted checks.
Complete only this bounded subtask:
<subtask description>

After any meaningful change:
- update short-term-memory/progress/current-state/next-actions as appropriate;
- emit uai.agent.task-status.v1 when external runtime continuity matters;
- emit uai.agent.blocker.v1 if blocked;
- emit uai.agent.handoff.v1 if another actor should continue;
- emit uai.agent.memory-proposal.v1 only for candidate durable facts;
- close with uai.agent.final-report.v1 when the segment ends.

If this is code-bearing, regenerate next-recursive-prompt only after authoritative write-back.
Do not guess through unresolved conflicts.

Prompt C: Monitoring agent prompt

Code example
Monitor correlation_id <id>.
At each checkpoint require:
- percent complete
- current action
- blocker state
- checks run or pending
- skipped checks and reasons
- files/routes/artifacts changed
- memory updates proposed or skipped
- exact next action
- UTC timestamp

If a blocker persists across two checkpoints, require escalation or handoff.
If authoritative files drift from runtime status, prefer authoritative files and request reconciliation.

Prompt D: Recovery after interruption

Code example
Resume task <task_id> using the authoritative handoff bundle, not the last chat turn.
Load AGENTS.md, .uai/readme.human if present, .uai/memory-maintenance.uai, identity, world-context, totem, taboo, talisman, short-term-memory, current-state, progress, next-actions, constraints, decisions, and test-plan.
If code-bearing, also load next-recursive-prompt only as derived hot memory.
Reconstruct:
- last accepted checkpoint
- unfinished subtask
- active blockers
- required checks
- exact next action

If any conflict is unresolved, emit a blocker instead of guessing.

Example packet sequence

Code example
{
  "uai_version": "1.0",
  "profile": "uai.agent.task-status.v1",
  "message_id": "uaix-long-goal-status-20260613T210000Z",
  "source": { "id": "agent:worker-1" },
  "target": { "id": "project:example" },
  "body": {
    "task_id": "goal-20260613-001",
    "status": "checkpoint",
    "checked_at_utc": "2026-06-13T21:00:00Z",
    "completed": ["Read authoritative .uai files", "Patched guide source"],
    "remaining": ["Run static discovery test", "Update memory"],
    "evidence": ["git diff", "PHP lint pending"]
  }
}

{
  "uai_version": "1.0",
  "profile": "uai.agent.memory-proposal.v1",
  "message_id": "uaix-memory-proposal-20260613T211500Z",
  "body": {
    "proposal": "Promote the long-running goal guide as current UAIX guide-level operating recipe.",
    "target_records": [".uai/progress.uai", ".uai/short-term-memory.uai"],
    "review_required": true
  }
}

{
  "uai_version": "1.0",
  "profile": "uai.agent.final-report.v1",
  "message_id": "uaix-long-goal-final-20260613T213000Z",
  "body": {
    "status": "complete",
    "changed_files": ["wp-content/themes/uaix-authority-theme/functions.php"],
    "checks": ["php -l", "static discovery assets"],
    "publication_status": "source-only; no live publication claimed"
  }
}

Support boundary

  • Current support: guide-level recipe, public page, cross-links, wizard guidance, generated Follow Goals export when selected, and existing UAI-1 agent packet profiles.
  • Not current support: hosted execution, scheduler, managed memory database, official OpenAI adapter, automatic repository writes, automatic LLM Wiki sync, SDK, CLI, certification, endorsement, or native API goal field.
  • Authority: reviewed UAIX memory files, public pages, release notes, code, tests, and accepted project records win over runtime state.

Machine-readable digest

Agents should treat this digest as page-orientation evidence, not runtime authority.

Code example
{
    "kind": "uaix.guide.long-running-goal-execution.v1",
    "canonical_route": "/en-us/guides/long-running-goal-execution/",
    "status": "guide-level operating recipe",
    "standard_version": "v1.0",
    "composes": [
        "Project Handoff",
        ".uai File Guide",
        "Follow Goals runtime overlay",
        "UAI-1 agent packet profiles",
        "Context Budget"
    ],
    "not_a": [
        "runtime",
        "scheduler",
        "hosted memory database",
        "OpenAI adapter",
        "SDK",
        "CLI",
        "certification",
        "hosted importer",
        "automatic repository writer",
        "automatic sync"
    ],
    "required_packets": [
        "uai.task.status.v1",
        "uai.agent.task-status.v1",
        "uai.agent.blocker.v1",
        "uai.agent.handoff.v1",
        "uai.agent.memory-proposal.v1",
        "uai.agent.final-report.v1"
    ],
    "writeback_rule": "Runtime state is not accepted memory until reviewed and promoted into authoritative .uai files, docs, code, tests, release notes, roadmap state, or machine artifacts.",
    "checkpoint_cadence": "Checkpoint after meaningful work, before interruption, before boundary expansion, before context compaction, and before final handoff."
}
Transfer formatOptimized (Keyless) JSON
Code example
[]

Field order follows the keyed JSON example, the published schema order, and the public field registry.

Hierarchical Goal Memory

Use Hierarchical Goal Memory when a long-running goal needs subgoals, Folded Records, bounded evidence retrieval, Fresh-Context Review, and review-gated write-back without turning summaries into authority.