Spaces:
Sleeping
Sleeping
Commit History
-
Claude Code: Fix worker env injection - add ANTHROPIC_API_KEY and CLAUDE_API_KEY to env config
Claude Code +1: Claude Opus 4.6- Added CLAUDE_API_KEY to .env.example (was completely missing) - Uncommented ANTHROPIC_API_KEY in .env.example (was commented out) - Added both keys to utils/env_init.py _CRITICAL_DEFAULTS - Added both keys to optional critical variables verification This fixes worker initialization failures where API keys were not properly propagated to the worker subprocess environment. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>740ba92 -
Claude Code: Fix silent worker loop initialization failure
Claude Code +1: Claude Opus 4.6- Add SLEEP_INTERVAL=5 to .env.example and env_init.py defaults - Add runtime environment debugging dump to brain_minimal.py startup - Explicitly export key env vars in entrypoint.sh (WORKER_MODE, AGENT_MODE, SLEEP_INTERVAL, WORKER_START_TIMEOUT) - Update asyncio polling loop to respect SLEEP_INTERVAL from environment This fixes the issue where brain_pid exists but worker state stays stuck at 'idle' because the polling loop was missing the SLEEP_INTERVAL configuration. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>0252d6e -
Claude Code: Add missing AGENT_MODE and WORKER_START_TIMEOUT to .env
Claude Code +1: Claude Code- 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>66342bb -
Claude Code: Improve defensive .env handling with robust error logging
Claude Code +1: Claude Opus 4.6- Add hardcoded skeleton fallback in env_init.py with safe defaults - Implement pure-Python .env parsing (no python-dotenv dependency) - Add explicit error logging for configuration failures - Ensure critical vars (OPENCLAW_DATA_DIR, PORT, WORKER_MODE) have safe defaults - Improve brain_minimal.py with better fallback handling and status logging Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>fcece3a -
Claude Code: Add defensive .env initialization to prevent FileNotFoundError on missing .env
Claude Code +1: Claude Opus 4.6- Add utils/env_init.py: Central utility to ensure .env exists using .env.example fallback - Update app.py: Import env_init early to ensure .env before any env variable access - Update cron/executor.py: Handle missing .env gracefully with try/except This prevents crashes when Python code runs directly without entrypoint.sh. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>8756346
-
Claude Code: Cain is running successfully. Let's implement a robust error logging sys
Claude Code30a95a7