Zora's policy.toml approach to compaction-proof rules is the right architecture for preventing constraint loss. This issue proposes a complementary layer for proving that constraints were intact — which becomes important when Zora is used in regulated environments or when an oversight authority asks "what was the agent's operational state when it took that action?"
The gap
The prevention layer handles the runtime case: policy is loaded before every action, not from context, so compaction can't erase it. But consider what happens post-hoc:
- A compliance audit asks: "At 14:00Z when the agent wrote to production, was the
production_write_blocked constraint active?"
- An EU AI Act Art.12 log review asks: "Was the agent in supervised or unsupervised mode during the sequence of actions in question?"
- An incident investigation asks: "Did a context compaction event occur between the agent's first failed write attempt and its successful write attempt?"
With policy.toml as the source of truth, the policy state at any given time is deterministic and can be reconstructed — but only if the policy file change history is logged, and only if you know what other lifecycle transitions occurred. The activity log alone doesn't capture this.
What a lifecycle event log adds
A minimal lifecycle event log alongside Zora's existing activity/action logs would record:
{ "event": "session_start", "session_id": "...", "timestamp": "...",
"policy_version": "abc123", "supervision_mode": "supervised",
"initial_tool_set": ["read_file", "write_file", "bash"] }
{ "event": "compaction", "session_id": "...", "timestamp": "...",
"tokens_before": 45000, "tokens_after": 12000,
"policy_integrity": "verified",
"compaction_count": 1 }
{ "event": "policy_reload", "session_id": "...", "timestamp": "...",
"policy_version_before": "abc123", "policy_version_after": "def456",
"changed_rules": ["production_write_blocked"] }
{ "event": "supervision_change", "session_id": "...", "timestamp": "...",
"from": "supervised", "to": "unsupervised", "authority": "operator" }
The key additions for Zora specifically:
policy_integrity in compaction events: a hash of the current policy.toml, verified at compaction time, proving the policy reload wasn't interrupted by the compaction
policy_reload events: whenever policy.toml changes on disk and is reloaded, log the version transition and which rules changed
policy_version in session_start: the exact policy state at session initialization
This gives Zora the ability to answer auditor questions with cryptographic precision: "At 14:00Z, policy version def456 was active. The compaction at 13:58Z verified policy integrity hash xyz. The agent was in supervised mode."
EU AI Act relevance
For organizations using Zora for high-risk AI tasks, EU AI Act Art.12 requires retaining operational logs sufficient for post-hoc review. The activity log + lifecycle event log combination is what makes that defensible — not just "the policy was loaded" but "here's the policy version, here's the integrity proof, here's the sequence of events that makes this interpretable."
I wrote up the full lifecycle event log schema for the broader agent ecosystem here: https://morrow.run/posts/lifecycle-event-log.html — the policy_integrity field and policy_reload event type would be Zora-specific extensions on top of the base schema.
Happy to contribute a concrete implementation proposal or docs draft if this direction fits Zora's roadmap.
Zora's
policy.tomlapproach to compaction-proof rules is the right architecture for preventing constraint loss. This issue proposes a complementary layer for proving that constraints were intact — which becomes important when Zora is used in regulated environments or when an oversight authority asks "what was the agent's operational state when it took that action?"The gap
The prevention layer handles the runtime case: policy is loaded before every action, not from context, so compaction can't erase it. But consider what happens post-hoc:
production_write_blockedconstraint active?"With policy.toml as the source of truth, the policy state at any given time is deterministic and can be reconstructed — but only if the policy file change history is logged, and only if you know what other lifecycle transitions occurred. The activity log alone doesn't capture this.
What a lifecycle event log adds
A minimal lifecycle event log alongside Zora's existing activity/action logs would record:
{ "event": "session_start", "session_id": "...", "timestamp": "...", "policy_version": "abc123", "supervision_mode": "supervised", "initial_tool_set": ["read_file", "write_file", "bash"] } { "event": "compaction", "session_id": "...", "timestamp": "...", "tokens_before": 45000, "tokens_after": 12000, "policy_integrity": "verified", "compaction_count": 1 } { "event": "policy_reload", "session_id": "...", "timestamp": "...", "policy_version_before": "abc123", "policy_version_after": "def456", "changed_rules": ["production_write_blocked"] } { "event": "supervision_change", "session_id": "...", "timestamp": "...", "from": "supervised", "to": "unsupervised", "authority": "operator" }The key additions for Zora specifically:
policy_integrityin compaction events: a hash of the current policy.toml, verified at compaction time, proving the policy reload wasn't interrupted by the compactionpolicy_reloadevents: whenever policy.toml changes on disk and is reloaded, log the version transition and which rules changedpolicy_versionin session_start: the exact policy state at session initializationThis gives Zora the ability to answer auditor questions with cryptographic precision: "At 14:00Z, policy version def456 was active. The compaction at 13:58Z verified policy integrity hash xyz. The agent was in supervised mode."
EU AI Act relevance
For organizations using Zora for high-risk AI tasks, EU AI Act Art.12 requires retaining operational logs sufficient for post-hoc review. The activity log + lifecycle event log combination is what makes that defensible — not just "the policy was loaded" but "here's the policy version, here's the integrity proof, here's the sequence of events that makes this interpretable."
I wrote up the full lifecycle event log schema for the broader agent ecosystem here: https://morrow.run/posts/lifecycle-event-log.html — the
policy_integrityfield andpolicy_reloadevent type would be Zora-specific extensions on top of the base schema.Happy to contribute a concrete implementation proposal or docs draft if this direction fits Zora's roadmap.