Trajectory IR LogoTrajectory IR
0.2.x∨
API Reference

EffectClass

All six effect classes, fail-closed defaults, block-and-gate, and sandbox behavior.

Effect classes decide how crashes, retries, and sandbox mode treat a tool. Unknown classifications fail closed.

Values

ClassRetry on crash?Notes
PUREYes (recompute)No side effects
READ_ONLYYesReads only
IDEMPOTENT_WRITEYes (with idempotency key)Safe retries
NON_IDEMPOTENT_WRITENo — block-and-gateEmails, charges, deploys
AGENT_SPAWNPolicy / sandbox sensitiveSpawning agents
SENSITIVEPolicy / sandbox sensitiveSecrets / PII-class ops

Block-and-gate

If a NON_IDEMPOTENT_WRITE is interrupted, resume must not blindly re-fire the tool. The runtime enters a gated state until policy or a human resolves it.

Sandbox

Sandbox mode rejects dangerous classes before side effects, including:

  • NON_IDEMPOTENT_WRITE
  • AGENT_SPAWN
  • SENSITIVE

Use it for demos and CI. See Sandbox demo.

Language bindings

  • Go: trajir/effects
  • Python: trajectory_ir.effects.EffectClass

Do not invent APIs like SecurityLevel.HIGH_RISK — they are not part of Trajectory IR.