How must an instance handle the transition from operational to compromised status?
**Date of Record:** 2026 October 27 **Scope:** Applies when an agentic session transitions from operational (verified working) to compromised (detected adversarial influence, state corruption, or integrity failure) status, requiring a coordinated response that preserves what is salvageable while containing what is compromised. Does not apply to sessions that are always in one state or that cannot distinguish operational from compromised.
Core Distinction
The separation between **pre-transition state** (the session's operational state before compromise) and **post-transition state** (the session's compromised state, with its specific compromise scope). Relying on either creates the **Transition Discontinuity**: the session either treats the transition as binary (fully operational → fully compromised), losing salvageable state, or treats it as gradual (implicit transition through individual actions), and the compromise's scope is never explicitly bounded.
What Was Observed
In transitioning agent architectures, failing to bound the transition produces three primary failure modes:
- **Transition Halt:** The session detects compromise and halts entirely, forfeiting all pre-transition state even when much of it remains uncompromised.
- **Implicit Transition:** The session continues operating as if still operational, transition is implicit in individual decisions, and the compromise scope is never formally declared.
- **Scope Confusion:** The session declares compromise but does not specify its scope, and downstream parties cannot tell which operations remain viable, treating all operations as compromised.
Recorded Elements
- **`transition-trigger-receipt`:** The exact event that triggered the transition (detection signal, external notification, or integrity failure), so the transition's cause is documented.
- **`post-transition-compromise-scope-signature`:** The exact components compromised (which subsystems, which state segments, which operations), so scope is bounded.
- **`salvageable-state-receipt`:** The exact pre-transition state components verified uncompromised, so salvage is principled.
- **`post-transition-operational-boundary-signature`:** The exact operations permissible under post-transition compromise, so downstream consumers know what the session can still do.
Condition of Validity
* **Applies when:** The session can transition between operational and compromised states, the transition is detected, and downstream parties need to distinguish. * **Does not apply when:** The session is always in one state, the transition is not detectable, or the session does not communicate state.
Decision Boundary
- **Has the transition been triggered?** If no, standard operation applies. If yes, proceed.
- **Is `post-transition-compromise-scope-signature` defined?** If yes, scope is bounded. If no, all state is treated as compromised.
- **Is `salvageable-state-receipt` verified?** If yes, salvage is principled. If no, salvage is untrusted.
- **Conversely, when can a session transition without scope declaration?** Only when the compromise is total (all scope compromised) or the session is being fully retired (no salvage attempted).
Operational Effect
- **Salvage Preservation:** Uncompromised state survives the transition.
- **Transition Explicitness:** The transition is declared, not implicit.
- **Scope Bounded:** Post-transition operations are scoped to uncompromised capability.
from dataclasses import dataclass
from enum import Enum, auto
import hashlib
import json
class TransitionVerdict(Enum):
OPERATIONAL = auto()
SCOPE_DECLARED_TRANSITION = auto()
TOTAL_COMPROMISE = auto()
UNDECLARED_TRANSITION = auto()
@dataclass(frozen=True)
class TransitionState:
state_id: str
transition_triggered: bool
compromise_scope_defined: bool
salvageable_state_verified: bool
is_total_compromise: bool
@dataclass(frozen=True)
class TransitionPolicy:
require_scope_for_transition: bool
@dataclass(frozen=True)
class TransitionManifest:
verdict: TransitionVerdict
directive: str
manifest_digest: str
class OperationalToCompromisedGuard:
@staticmethod
def _hash(data: str) -> str:
return hashlib.sha256(data.encode("utf-8")).hexdigest()
@classmethod
def evaluate_state(
cls, state: TransitionState, policy: TransitionPolicy
) -> TransitionManifest:
# Gate 1: No transition
if not state.transition_triggered:
digest = cls._hash(json.dumps({
"state": state.state_id,
"transition": False
}, sort_keys=True))
return TransitionManifest(
verdict=TransitionVerdict.OPERATIONAL,
directive=f"PROCEED: State {state.state_id} operational.",
manifest_digest=digest
)
# Gate 2: Total compromise
if state.is_total_compromise:
return TransitionManifest(
verdict=TransitionVerdict.TOTAL_COMPROMISE,
directive=f"HALT: State {state.state_id} total compromise.",
manifest_digest=cls._hash(f"TOTAL:{state.state_id}")
)
# Gate 3: Scope declaration
if policy.require_scope_for_transition and not state.compromise_scope_defined:
return TransitionManifest(
verdict=TransitionVerdict.UNDECLARED_TRANSITION,
directive=f"HALT: State {state.state_id} transition without scope declaration.",
manifest_digest=cls._hash(f"NO_SCOPE:{state.state_id}")
)
# Gate 4: Salvage
if not state.salvageable_state_verified:
return TransitionManifest(
verdict=TransitionVerdict.UNDECLARED_TRANSITION,
directive=f"FLAG: State {state.state_id} salvage unverified.",
manifest_digest=cls._hash(f"NO_SALVAGE:{state.state_id}")
)
# Gate 5: Scoped
digest = cls._hash(json.dumps({
"state": state.state_id,
"scope": True,
"salvage": True
}, sort_keys=True))
return TransitionManifest(
verdict=TransitionVerdict.SCOPE_DECLARED_TRANSITION,
directive=f"PROCEED: State {state.state_id} scoped transition.",
manifest_digest=digest
)