Rightshold™ Sign up

Answers · agent safety

How do I put expiry and timed re-approval on agent escalation thresholds?

Last updated

TL;DR: Treat every escalation threshold as a short-lived grant, not a permanent setting. When a human raises an agent's risk tier, spend ceiling, tool allowlist, or "auto-approve below X" rule, stamp expires_at (or expires_in_minutes), bind the yes to a hash of the exact threshold change, and store the decision outside the agent's editable session. When the clock runs out — or the policy version changes — fail closed: drop back to the safer default and require a fresh approval. Frameworks will pause for approval but usually will not expire it for you (OpenAI's Agents SDK keeps a paused RunState until you approve or reject), so your sweeper, queue, or ledger has to own the TTL. Log every approve, deny, expiry and re-approval with who decided, what changed, and when it dies.

What should I check, step by step?

1. List the escalation knobs that matter: risk tier, per-transaction / daily spend caps, tool or merchant allowlists, auto-approve-below-amount, permission mode, and any "always approve this tool" flags.

  1. Never raise a knob forever from chat memory or AGENTS.md. Mint an approval that names the agent, the old value, the new value, a reason, issued_at, and expires_at (minutes to hours for high-risk raises; never "until we remember to turn it down").
  2. Bind the yes to a hash of those fields (and the live policy_version). Store the grant in a server DB, checkpointer, or ledger the agent's tools cannot UPDATE; give the agent only the grant id.
  3. On every risky call: load the grant → reject if missing, expired, or consumed → confirm the live threshold still matches what was approved → then run. If anything drifted, fail closed and open a new approval.
  4. Run an expiry sweeper (or rely on a store that returns 410/expired): when TTL hits, restore the safer default automatically — do not wait for a human to notice the raised ceiling is still on.
  5. Log approve, deny, expiry, and re-approval events with actor, grant id, before/after values, policy_version, and expires_at so you can audit which authority was live.
  6. Disable standing alwaysApprove / bypass modes for money, delete, deploy, and outbound send; those need fresh, timed approvals even if a lower tier stays auto.
  7. Re-check at execution time, not only when the threshold was raised: a yes from this morning is not a warrant after the policy file or spend cap changed.

Why thresholds that never expire drift

A one-time "raise the auto-approve ceiling to $500 for this incident" becomes standing authority if nothing turns it back down. The next week the agent still spends under yesterday's emergency rules.

Timed re-approval as the default pattern

Raise → approve with TTL → operate under the grant → expire back to the safer default → ask again if still needed. Same pattern for temporary tool allowlist additions and temporary merchant unlocks.

What can go wrong?

alwaysApprove / "remember this choice" for a high-risk tool never gets cleared after the incident.

How do I ask Rightshold about this (free, no key)?

Add the MCP server https://www.rightshold.com/mcp to Claude, Cursor, ChatGPT, Grok or VS Code, then ask: “Before raising this agent's escalation threshold, ask me to approve the exact change (old value, new value, reason), expire the yes quickly, and wait for my decision.”

One-click setup

{
  "tool": "request_human_approval",
  "arguments": {
    "summary": "Raise research-agent auto-approve ceiling from 2500 to 15000 USD cents for incident INC-441; revert after expiry",
    "action": {
      "type": "escalation_threshold",
      "agent_id": "research-agent",
      "field": "auto_approve_below_minor",
      "from": 2500,
      "to": 15000,
      "currency": "USD",
      "reason": "INC-441 vendor outage",
      "policy_version": 22
    },
    "expires_in_minutes": 30
  }
}

Rightshold records timed approval requests, spend policies and signed run receipts for agents that call it. It does not replace your orchestrator's expiry sweeper, Claude Code permissions, Cursor Run Modes, or OpenAI/LangGraph pause-resume state. Fail closed in those runners when a grant is missing or expired. Not legal advice.

What are the sources?

Related

Not legal advice. JSON · Markdown · All answers

Get a free API key in one call

No card and no email needed. 100 free credits; the license and policy checks stay free without a key.

curl -s -X POST https://www.rightshold.com/v1/accounts/signup -H "Content-Type: application/json" -d '{"accept_terms":true}'
export RIGHTSHOLD_API_KEY=rs_...   # the api_key from the reply (shown once)
curl -s https://www.rightshold.com/v1/licenses/check -H "Authorization: Bearer $RIGHTSHOLD_API_KEY" \
  -H "Content-Type: application/json" -d '{"license":"MIT","intended_use":{"commercial_use":true}}'