Claude Code Claude Code commited on
Commit
66342bb
Β·
1 Parent(s): 50b0ecc

Claude Code: Add missing AGENT_MODE and WORKER_START_TIMEOUT to .env

Browse files

- Add AGENT_MODE=active to .env.example (prevents brain from defaulting to sleep)
- Add WORKER_START_TIMEOUT=30 to .env.example (prevents crash loop)
- Update env_init.py critical defaults to include new variables

These variables were missing and causing the Brain to stay in IDLE state
instead of transitioning to RUNNING/active processing.

Co-Authored-By: Claude Code <noreply@anthropic.com>

Files changed (2) hide show
  1. .env.example +16 -0
  2. utils/env_init.py +4 -0
.env.example CHANGED
@@ -34,6 +34,22 @@ OPENCLAW_PASSWORD=huggingclaw
34
  #
35
  WORKER_MODE=auto
36
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
 
38
  # ─── DATA PERSISTENCE ────────────────────────────────────────────────────
39
  #
 
34
  #
35
  WORKER_MODE=auto
36
 
37
+ # Agent operation mode - controls brain processing behavior
38
+ # - active: Agent processes thoughts continuously
39
+ # - passive: Agent waits for explicit triggers
40
+ # - sleep: Agent remains idle (default if missing)
41
+ #
42
+ # [RECOMMENDED] Default: active
43
+ #
44
+ AGENT_MODE=active
45
+
46
+ # Worker startup timeout in seconds - prevents crash loop on rapid restarts
47
+ # Higher values give more time for initialization before timeout
48
+ #
49
+ # [RECOMMENDED] Default: 30
50
+ #
51
+ WORKER_START_TIMEOUT=30
52
+
53
 
54
  # ─── DATA PERSISTENCE ────────────────────────────────────────────────────
55
  #
utils/env_init.py CHANGED
@@ -30,6 +30,10 @@ _CRITICAL_DEFAULTS = {
30
  "WORKER_MODE": "auto",
31
  "OPENCLAW_PASSWORD": "huggingclaw",
32
 
 
 
 
 
33
  # Sync defaults
34
  "SYNC_INTERVAL": "60",
35
  "AUTO_CREATE_DATASET": "false",
 
30
  "WORKER_MODE": "auto",
31
  "OPENCLAW_PASSWORD": "huggingclaw",
32
 
33
+ # Agent defaults
34
+ "AGENT_MODE": "active",
35
+ "WORKER_START_TIMEOUT": "30",
36
+
37
  # Sync defaults
38
  "SYNC_INTERVAL": "60",
39
  "AUTO_CREATE_DATASET": "false",