Skip to content

feat(lifecycle): add irreversible resident retirement - #116

Open
ian-de-marcellus wants to merge 1 commit into
anima-research:mainfrom
ian-de-marcellus:feat/resident-retirement
Open

feat(lifecycle): add irreversible resident retirement#116
ian-de-marcellus wants to merge 1 commit into
anima-research:mainfrom
ian-de-marcellus:feat/resident-retirement

Conversation

@ian-de-marcellus

Copy link
Copy Markdown

Problem

Persistent resident agents can end a turn or enter reversible dormancy, and operators can erase stored data, but there is no agent-callable terminal lifecycle state that permanently prevents future inference while preserving the identity’s Chronicle and history.

Changes

  • Add opt-in AgentConfig.retirement and a per-resident resident_lifecycle tool. Ephemeral agents and per-channel conversation forks do not receive it.
  • Require a fresh, in-memory, one-use challenge and an exact confirmation in a separate inference turn. Both steps are performed by the resident; there is no human approval callback.
  • Fsync an append-only retirement seal outside Chronicle’s reversible branch projection, then record the terminal lifecycle event in Chronicle.
  • After confirmation, reject queued and future inference, direct starts, and operator nudges; skip model-backed context maintenance; stop resident-authored code runners; and freeze the resident conversation against later message appends.
  • Preserve Chronicle, messages, workspace data, inference logs, and the terminal record. Retirement remains distinct from end-turn, dormancy, and erasure.
  • Add public lifecycle status and trace types, documentation, changelog notes, and integration tests covering successful confirmation, invalid one-use confirmation, history preservation, restart resistance, maintenance suppression, and app-owned stores.

Tests

  • npm run build: pass
  • npm test: 598 pass / 0 fail / 1 existing skip
  • git diff --check: pass

Not verified

  • Not exercised against a paid or live model provider.
  • Not independently exercised on Linux; repository CI covers Ubuntu and macOS.
  • No process-crash or power-loss fault injection was performed around the fsync boundary.

Out of scope

  • Dormancy policy, data erasure, or a framework reversal API.
  • Preventing a machine owner from altering files outside the framework.

Companion PRs

A companion connectome-host recipe change is prepared on ian-de-marcellus/connectome-host:feat/resident-retirement.

Merge and release this Agent Framework change first. The Host companion can then update its dependency range and lockfile to the released version before becoming ready to merge.

If only this PR lands, the generic lifecycle API becomes available to hosts, but Connectome recipes do not yet expose it.


  • CHANGELOG.md updated under ## Unreleased.

🤖 Generated with OpenAI Codex

Co-Authored-By: GPT-5.6 Codex <noreply@openai.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant