The DevOps Execution Engine is designed with safety as the primary concern. This document explains the safety guarantees and controls.
No execution without explicit human approval for medium+ risk actions.
Every action is classified into one of four risk levels:
Read-only operations with no impact on running systems
Examples:
kubectl get(any resource)kubectl describekubectl logskubectl topaws ec2 describe-instancesdocker ps- Log analysis
- System health checks
Safety:
- May be auto-approved (if configured)
- No approval required by default
- Cannot cause harm
Modifications that are reversible and have controlled impact
Examples:
kubectl scale deploymentkubectl edit configmapkubectl patch(non-critical resources)kubectl rollout restart- Scaling operations
- Configuration changes
- Non-production deployments
Safety:
- Always requires approval
- Plan β Approve β Execute workflow
- Rollback plan must be included
- Pre-flight validation required
- Post-execution validation required
Production changes with potential for service disruption
Examples:
- Production deployments
kubectl delete(any resource)- Database schema changes
- Certificate updates
- Network policy changes
- Security configuration
- Critical service restarts
Safety:
- Always requires approval
- Impact analysis required
- Detailed rollback plan
- Multiple validation steps
- Monitored execution
- Logged to audit trail
Operations that can cause data loss or security issues
Examples:
kubectl delete namespacekubectl delete pv(persistent volumes)- RBAC/security policy changes
- Production database deletion
- Secret/credential rotation
- Multi-cluster operations
Safety:
- Blocked by default
- Requires explicit override
- Two-person approval (recommended)
- Comprehensive rollback plan
- Dry-run required first
- Full audit trail
You: The API is slow
Clawd: [performs diagnosis]
- Checks pod status
- Analyzes logs
- Reviews metrics
- Identifies root cause
No approval needed - This is read-only.
Clawd: I found the issue. Generating execution plan...
π EXECUTION PLAN: plan-20260126-001
Title: Fix slow API response (increase replicas)
Risk: MEDIUM
Time: ~3min
[detailed plan shown]
Approve? (yes/no/explain)
Human review required - Plan is presented but not executed.
You can:
- Review the plan in detail
- Ask questions ("explain step 2")
- Request modifications ("use 5 replicas instead of 3")
- Approve ("yes" or "approve")
- Reject ("no" or "cancel")
You: approve
Clawd: β
Executing plan-20260126-001...
Step 1/3: Scaling deployment... β
Step 2/3: Waiting for rollout... β (45s)
Step 3/3: Verifying pods... β
β
Complete! All pods running.
Logged to: memory/actions-log.jsonl
Clawd: Post-execution validation:
β All 5 replicas running
β No error logs
β API response time improved
Would you like me to monitor for the next 5 minutes?
Before execution, verify:
- Resources exist
- Current state matches assumptions
- Dependencies are met
- No conflicting operations
Every plan includes:
- How to undo the change
- Estimated rollback time
- Verification steps
Example:
rollback:
method: "Rollback deployment to previous revision"
commands:
- "kubectl rollout undo deployment/api-service"
estimated_time: "2min"- One command at a time
- Verify outcome before next step
- Stop on first error
- Log each action
After execution, verify:
- Desired state achieved
- No errors introduced
- Services healthy
- Metrics normal
Every action logged to actions-log.jsonl:
{
"timestamp": "2026-01-26T13:00:00Z",
"plan_id": "plan-20260126-001",
"action": "kubectl scale deployment",
"resource": "production/api-service",
"risk": "MEDIUM",
"status": "success",
"approver": "human",
"duration_seconds": 45
}What happens:
- Execution stops immediately
- Error logged
- Rollback plan presented
β Step 2 failed: Rollout timeout after 5 minutes
Error: context deadline exceeded
Rollback available:
kubectl rollout undo deployment/api-service
Execute rollback? (yes/no)
You decide whether to rollback or investigate.
What happens:
- Post-execution check fails
- Alert generated
- Automatic rollback suggested
β οΈ Post-execution validation failed
Check: All pods running
Expected: 5 pods
Got: 3 pods (2 in CrashLoopBackOff)
Suggest immediate rollback? (yes/no)
What happens:
- Execution begins
- You can still cancel early steps
- Full audit trail maintained
You: wait, stop!
Clawd: βΈοΈ Pausing after current step...
Step 1/5 completed
Remaining steps cancelled
Rollback? (yes/no)
execution:
auto_approve_low_risk: trueCaution: Even with auto-approval, actions are still logged.
safety:
block_production: true
production_namespaces:
- production
- prod
- liveEffect: Any action on these namespaces requires explicit override.
execution:
require_dry_run: trueEffect: High-risk actions must be tested in dry-run mode before actual execution.
- Install with read-only kubeconfig
- Build trust through diagnosis
- Graduate to write access
- Don't just say "yes"
- Read the commands
- Understand the impact
- Check the rollback plan
- Generate plans for staging
- Verify the approach works
- Then apply to production
# Review recent actions
tail -20 ~/clawd/memory/actions-log.jsonl
# Check for failures
grep '"status":"failed"' ~/clawd/memory/actions-log.jsonl- Don't delete execution plans
- Build a library of tested patterns
- Learn from failures
- Stop execution - Say "stop" or "cancel"
- Assess damage - Check current state
- Execute rollback - Use the pre-defined rollback plan
- Verify recovery - Confirm services restored
- Document incident - Log what happened
# In config.yaml
safety:
allow_critical: true
require_approval: false # NOT RECOMMENDEDβ
Diagnose issues (read-only)
β
Generate execution plans
β
Execute approved commands
β
Monitor and verify results
β
Rollback on failure
β
Log all actions
β Execute commands without approval
β Bypass safety controls
β Hide actions from audit log
β Delete data without confirmation
β Modify security policies automatically
- Every action logged (JSONL format)
- Timestamped and attributed
- Immutable (append-only)
- Includes approval info
- Separation of duties (AI suggests, human approves)
- Full auditability
- Rollback capability
- Change documentation (execution plans)
# Export last 30 days
node -e "
const logger = require('./core/logger');
const l = new logger();
const start = new Date();
start.setDate(start.getDate() - 30);
l.exportRange(start, new Date()).then(console.log);
"Q: Can Clawd execute commands without me knowing?
A: No. Every MEDIUM+ risk action requires explicit approval.
Q: What if I approve something by mistake?
A: Early steps can be cancelled, and full rollback plans are always available.
Q: How do I know what Clawd is doing?
A: Check the execution plan before approval, monitor during execution, review audit logs after.
Q: Can I trust the execution engine?
A: It's open source (Apache 2.0). Review the code yourself.
Q: What happens if Clawd crashes during execution?
A: Partial execution is logged. Resume manually or rollback using the plan.
Remember: You are always in control. Clawd assists, you decide.