Atlas Infrastructure
← Dispatch Trigger
Internal Reference

Dispatch Resilience Guide

How Atlas keeps Claude Desktop sessions healthy — and how to force a reset when they're not.

What This System Does

Claude Desktop sessions can go stale — the AI stops responding predictably, context gets polluted, or the connection to Atlas Command degrades silently. The Dispatch Resilience system monitors for these conditions and provides multiple reset paths so you're never stuck.

At its core, the system runs background daemons (via macOS LaunchAgents) that watch session health, back up memory, and respond to reset signals from any device. A Mem0 signal flag (user_id: atlas-dispatch) acts as the cross-device trigger — set it from a phone, terminal, or Siri Shortcut, and the daemon on your Mac picks it up and launches a clean session within ~60 seconds.

Design principle
The trigger is intentionally simple: any device that can hit the Mem0 API can kick a reset. No VPN, no SSH, no app required.

System Components

File Role Runs
health-check.sh Polls Claude Desktop process health; restarts if unresponsive or memory-bloated Every 5 min (LaunchAgent)
memory-backup.sh Archives Claude's local state & conversation databases before any restart Pre-restart / on demand
backdoor-watcher.sh Watches the Mem0 atlas-dispatch user for a FORCE_NEW_SESSION signal; triggers reset when found Every 60 s (LaunchAgent)
force-new-session.sh Full hard reset — kills Claude Desktop, archives stale state, relaunches cleanly Called by watcher or manually
request-new-session.sh Writes the FORCE_NEW_SESSION signal to Mem0 (same as the phone trigger, but from Terminal) On demand / alias new-dispatch
trigger.html Phone-accessible web button at atlas-dispatch-trigger.pages.dev — POSTs signal to Mem0 On demand (any browser)
install.sh One-time setup: copies LaunchAgent plists, loads daemons, writes shell alias Run once at setup

5 Ways to Force a New Session

🖥️
1 — Claude Desktop App
Quit Claude Desktop completely (Cmd+Q or Force Quit), then reopen. This clears in-memory state. Use this for mild staleness — full context is preserved.
⌨️
2 — Terminal Alias
Run the alias from any Terminal window. Sends the Mem0 signal and the watcher handles the rest.
new-dispatch
Alias calls request-new-session.sh → watcher picks up signal → full reset in ~60s.
📱
3 — Phone Trigger (This Site)
Open atlas-dispatch-trigger.pages.dev on any device and tap the red button. Works over any network — no VPN needed.
🤖
4 — Orin / Ziggy via Atlas Command Bridge
Ask Orin or Ziggy directly in any Atlas Command interface. They route through the claude_command or tell_ziggy tools to signal a reset.
"Orin, force a new Claude session"
"Ziggy, dispatch reset"
🍎
5 — iOS Shortcut via Mem0 API
A Shortcuts automation can POST the signal directly, enabling Siri voice triggers or Home Screen one-tap.
POST https://api.mem0.ai/v1/memories/
Authorization: Token M0-2LQUIGE9J73EPVFH1XGD6ZNNZ6CVXVMATTGKIO8H
Content-Type: application/json

{
  "messages": [{"role":"user","content":"FORCE_NEW_SESSION"}],
  "user_id": "atlas-dispatch",
  "metadata": {"signal":"FORCE_NEW_SESSION","source":"ios-shortcut"}
}

First-Time Setup

1
Run the installer
cd ~/infrastructure/dispatch-health
bash install.sh
Installs LaunchAgents, writes the new-dispatch alias to your shell profile, and validates the Mem0 API key.
2
Verify daemons loaded
launchctl list | grep atlas
You should see two entries — com.atlas.dispatch-health and com.atlas.backdoor-watcher — with a PID (not a dash) in the first column.
3
Reload your shell profile
source ~/.zshrc
Makes the new-dispatch alias available immediately.
4
Test end-to-end
new-dispatch
Watch Claude Desktop — it should quit and reopen within ~90 seconds. Check logs if it doesn't (see Troubleshooting below).

Troubleshooting

Signs of a stale session

Claude stops using tools or gives circular non-answers

Context window may be saturated. Force a new session — don't try to continue in the same window.

Atlas Command tools return stale or empty results

The Claude ↔ Atlas bridge has degraded. A reset restores the connection.

Memory writes/recalls fail silently

Session-level Mem0 state can get out of sync. Reset clears it.

Reset didn't work

Watcher daemon not running

Run launchctl list | grep atlas. If empty, re-run bash install.sh. If entries show a non-zero exit code in column 2, check logs:

tail -50 ~/Library/Logs/atlas-backdoor-watcher.log
LaunchAgent plist broken or unloaded after macOS update

Reload manually:

launchctl unload ~/Library/LaunchAgents/com.atlas.dispatch-health.plist
launchctl load   ~/Library/LaunchAgents/com.atlas.dispatch-health.plist
launchctl unload ~/Library/LaunchAgents/com.atlas.backdoor-watcher.plist
launchctl load   ~/Library/LaunchAgents/com.atlas.backdoor-watcher.plist
Still not resolving — Anthropic support ticket open

Ongoing session persistence issue reported to Anthropic. Reference: Ticket #215473870598016. Contact: support@anthropic.com

Log locations

~/Library/Logs/atlas-health-check.log
~/Library/Logs/atlas-backdoor-watcher.log
~/Library/Logs/atlas-memory-backup.log

Key Reference

ResourceValue / Location
Scripts directory ~/infrastructure/dispatch-health/
Secrets / API keys file ~/infrastructure/dispatch-health/.env
Terminal alias new-dispatch → calls request-new-session.sh
Desktop app Claude Desktop — /Applications/Claude.app
This site atlas-dispatch-trigger.pages.dev
Anthropic support ticket #215473870598016 — support@anthropic.com
N8N workspace asulaiman99.app.n8n.cloud
Mem0 user_id atlas-dispatch
Mem0 API https://api.mem0.ai/v1/memories/
Trigger signal FORCE_NEW_SESSION (message content)
Atlas Command worker command.atlaslaw.ai