Skip to content

Resource Health & Reconciliation

Health States

StateDescriptionRecoverableAction
HealthyRunning normallyN/ANone
StoppedContainer stopped but intact✅ YesStart
PendingCreation in progress⏳ WaitWait or cancel
ErrorFailed to start/run✅ YesRecreate
CrashLoopRepeatedly crashing⚠️ MaybeRecreate Fresh
MissingResource deleted externally✅ YesRecreate
DeletedExternallyRemoved outside Clauderon✅ YesRecreate or Cleanup

State Transitions

┌─────────────┐
│ Pending │
└──────┬──────┘
┌─────────────────► Healthy ◄─────────────┐
│ │ │
│ ▼ │
│ ┌──────────┐
│ │ Stopped │
│ └────┬─────┘
│ │
│ ▼
└──────────────┌──────────┐
│ Start │
└──────────┘
Error/Missing/CrashLoop
┌──────────────┐
│ Recreate │────► Healthy
│ (or Cleanup) │
└──────────────┘

Backend Mappings

StateDockerZellij
HealthyContainer runningSession active
StoppedContainer exists but not running-
MissingContainer deletedSession not found
ErrorContainer exited with errorProcess exited

Available Actions by State

StateStartRecreateRecreate FreshCleanup
Healthy
Stopped
Error
CrashLoop
Missing

Data Preservation

ActionGit stateUncommitted changesChat historyConfig
Start
Recreate✅ (if clone exists)
Recreate Fresh✅ committed only
Cleanup

Reconciliation

Automatically recovers sessions from failures using exponential backoff (30s, 2m, 5m). Stops after 3 failed attempts.

Triggers

  • On daemon startup (flag: reconcile_on_startup)
  • After backend errors
  • Manual: clauderon reconcile [session-name]

Strategy by State

StateAction
ErrorAttempt recreate
MissingAttempt recreate (if clone exists)
CrashLoopWait, then recreate fresh
DeletedExternallyMark missing, attempt recreate
StoppedNo action (intentional)

Recovery Commands

Terminal window
# CLI
clauderon start <session>
clauderon recreate <session>
clauderon recreate <session> --fresh
clauderon cleanup <session>
clauderon delete <session>
# API
POST /api/sessions/{id}/start
POST /api/sessions/{id}/recreate
POST /api/sessions/{id}/recreate-fresh
POST /api/sessions/{id}/cleanup

TUI: Press h on session for health modal with available actions.

Configuration

~/.config/clauderon/config.toml
[feature_flags]
reconcile_on_startup = true
[reconciliation]
initial_delay = 30
backoff_multiplier = 2.0
max_attempts = 3
max_delay = 300
[health]
check_interval = 60
check_timeout = 10
background_checks = false

Troubleshooting

ProblemDiagnosisSolution
Fails after 3 attemptsclauderon inspect <session>clauderon recreate --fresh or cleanup + recreate
Always returns to errorCheck docker logs <id> and clauderon logs <session>Fix backend issue (disk, permissions); recreate with different backend
Orphaned resourcesdocker ps shows container but Clauderon doesn’tdocker stop/rm <id> then clauderon cleanup
External deletionShows “DeletedExternally”clauderon recreate or clauderon cleanup