MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / is_state_violation

Method is_state_violation

atomic-agent/src/error.rs:378–385  ·  view source on GitHub ↗

Returns `true` if this error is a session state machine violation that might indicate a crashed or interrupted agent.

(&self)

Source from the content-addressed store, hash-verified

376 /// Returns `true` if this error is a session state machine violation
377 /// that might indicate a crashed or interrupted agent.
378 pub fn is_state_violation(&self) -> bool {
379 matches!(
380 self,
381 AgentError::TurnNotActive { .. }
382 | AgentError::TurnAlreadyActive { .. }
383 | AgentError::SessionEnded { .. }
384 )
385 }
386
387 /// Returns a user-facing suggestion for how to fix the error, if applicable.
388 pub fn suggestion(&self) -> Option<&'static str> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected