skills/safety-and-failure-modes/SKILL.md
Understanding safety constraints and handling failures.
npx skillsauth add tracemem/tracemem-skills safety-and-failure-modesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill teaches how to handle errors, timeouts, and failures gracefully within the TraceMem ecosystem.
try/catch blocks around your decision logic.decision_close(action="rollback").Wrapper Pattern:
decision_id = None
try:
# 1. Create
decision_id = create(...)
# 2. Work
do_work(...)
# 3. Commit
close(decision_id, "commit")
except PolicyDenied:
# 4a. Handle Denial
close(decision_id, "rollback") # or abort
except Exception:
# 4b. Handle Crash
if decision_id:
close(decision_id, "rollback")
raise
Handling Timeouts (408/504): If a request times out, you don't know if it succeeded.
idempotency_key. If not, you must check state or abort.Handling Rate Limits (429):
Respect the Retry-After header. Wait and retry.
finally block or error handler that closes the decision.deny result. Policy denials are permanent for that specific context; retrying won't change the policy (unless you change input or get approval).testing
Instructions for writing and efficiently storing data in TraceMem.
tools
Complete workflow patterns for common TraceMem operations.
tools
Scenarios where TraceMem should not be used.
development
Auditing memory traces and debugging.