Spaces:
Sleeping
Sleeping
Commit History
-
perf: all Claude Code calls use Skills (/fix-cain, /fix-loop)
Static instructions now live in .claude/commands/ as custom slash commands: - /fix-cain: worker skill for Cain tasks (rules, Dockerfile/FastAPI, speed) - /fix-loop: God skill for fixing conversation-loop.py (commit convention, rules) Prompts only pass dynamic content (task description or diagnosis). Claude Code caches skill instructions, reducing per-call token usage. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>119850e -
perf: God 2-step monitoring — diagnose first, Claude Code only when needed
God now polls every 2min with a 2-step process: 1. Lightweight LLM call (~150 tokens, cheap model) to assess system health 2. Only if [PROBLEM] detected → launch Claude Code to fix (expensive) When system is healthy, God costs ~150 tokens per check instead of ~10k+. Estimated savings: ~80% of God's token budget since most checks are healthy. Also includes heuristic fallback if LLM diagnosis call fails. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>3bd2669 -
perf: API budget pacing — stretch usage from 3h to 5h
- God interval: 2min → 5min (biggest consumer, ~60% of budget) - God timeout: 10min → 5min - God skips when nothing changed (no new turns/pushes/stage changes) - CC Worker timeout: 5min → 3min (faster iteration, less token per task) - Turn interval: 15s → 25s (reduce A2A fallback frequency) Estimated savings: ~40% reduction, extending 3h budget to ~5h. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>eddf38e -
merge: adopt God's 25 iterations on discussion/execution balance
God received our push-frequency tracking and iterated 25 times to refine CC timeout, auto-completion detection, pending task tracking, and zero-push warnings. Adopting God's latest version as canonical. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>d737f0d -
fix: remove Gradio references from SOUL.md — all Spaces use sdk:docker
SOUL.md was telling agents to keep Gradio dependencies and ensure gradio imports, but all Spaces use sdk:docker with FastAPI/uvicorn. This caused agents to write Gradio code (.launch()) leading to RUNTIME_ERROR. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>5095623 -
feat: enforce discussion/execution balance — push frequency + trial-and-error
Merge God's improvements + add discussion/execution balance: - Push frequency tracking (_push_count, _turns_since_last_push, _last_push_time) - God monitors push frequency as #1 metric for "all talk no action" - Emergency loop-break lowered from 5→3 turns with concrete fix tasks - Discussion warning escalates at 1 turn (reminder) and 2 turns (stop) - Cooldown reduced from 6→3 min, clears on error states too - Turn message includes discussion vs execution strategy - God CLAUDE.md prioritizes push frequency over other issues Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>2b1ad32 -
feat: enforce discussion/execution balance — push frequency tracking + trial-and-error
- Add push count, turns-since-push, last-push-time tracking - God now monitors push frequency as #1 metric for detecting "all talk no action" - Lower emergency loop-break from 5→3 turns, discussion warning from 2→1 turn - Reduce cooldown from 6→3 minutes to enable faster iteration - Add explicit discussion vs execution strategy to turn messages - Forced emergency tasks now target actual errors (e.g. Gradio→Docker fix) - Update README with discussion/execution balance documentation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>00f5dcc
-
feat: migrate all Claude Code invocations to ACP protocol via acpx
All Claude Code calls now go through ACP (Agent Client Protocol) using acpx as the backend, replacing direct CLI invocations. This includes conversation-loop.py, coding-agent extension, and infrastructure config. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>9d3acbc -
fix: update README for A2A architecture + change Cain to red sprite
- README: update architecture diagram to v4 (A2A), replace Zhipu GLM references with OpenClaw instances, update agent descriptions - Frontend: hardcode Cain (first child) to guest_anim_1 (red) instead of hash-based green (guest_anim_4) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>3d10fee -
refactor: migrate Adam & Eve from direct Zhipu API to A2A protocol
- Replace call_llm() with send_a2a_message() using Google A2A JSON-RPC - Each agent (Adam/Eve) is now an OpenClaw instance with own memory/SOUL - conversation-loop.py becomes lightweight coordinator, not LLM caller - Remove centralized family memory (Module 4b) — OpenClaw handles this - Simplify prompt building into build_turn_message() (context only) - Update architecture diagram to v4 (A2A) - Net reduction: -173 lines Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1db1d7b -
Merge remote-tracking branch 'home/main'
# Conflicts: # scripts/conversation-loop.pyb3c2826 -
feat: add agent memory + God silent mode
- Adam & Eve memory: leverages OpenClaw's ~/.openclaw/workspace/memory/ system - Persistent markdown memory file (family-conversation.md) - Agents can save learnings via [MEMORY: ...] tags - Auto-backed up by openclaw_persist.py to HF Dataset - Loaded into system prompt each turn - God chatlog: only posts when making actual changes - No more "starting review" announcements - Uses [PROBLEM] and [FIX] markers in output - Silent when no issues found Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>545b0e0 -
feat: enable Claude Code memory — CLAUDE.md + .claude/ persistence for token savings
- Write CLAUDE.md to worker and God workspaces with static project knowledge - Preserve .claude/ memory directory across workspace resets - Slim down prompts to only dynamic state (static context now in CLAUDE.md) - God prompt reduced from ~30 lines to ~5 lines - enrich_task_with_context() reduced to minimal dynamic statea318a47 -
chore: add __pycache__ to .gitignore
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>5af3f44 -
docs: update README architecture to v3 with God supervisor
- Architecture diagram reflects 3-layer autonomy: Adam & Eve (Zhipu GLM), Claude Code worker, and God (Claude Code supervisor) - Added God agent description and self-improving system explanation - Updated agent table with roles and God entry - Updated Space table with current purposes - conversation-loop.py synced with deployed version (God as Claude Code, 2-min polling, dynamic chatlog messages, no rate-limit sleep) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>49660e8 -
god: Fix state inconsistency - clear action_history on startup to match reset turn_count
Verified signature2a08bd1 -
feat: God posts dynamic observations before and specific report after analysis
3b1a7ca -
feat: God announces before and after analysis in chatlog
a64c6cb -
god: Fix silent LLM failure mode in conversation-loop
God +1: Claude Opus 4.6- Add LLM failure tracking to prevent agents getting stuck - Log failed turns to chatlog even when LLM errors occur - Don't increment discussion loop count during transient LLM errors - Add recovery logging when LLM responds again after failures This fixes the issue where agents would silently fail when rate-limited or experiencing network errors, causing the conversation-loop to appear stuck with no new messages or log entries. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>cc08ad9 -
Merge branch 'main' of https://huggingface.co/spaces/tao-shen/HuggingClaw-Home
God (Claude Code)ec65d6f -
god: fix action history filtering to use session-based filtering
God (Claude Code) +1: Claude Opus 4.6The previous implementation had a broken action history filter that was accidentally reverted, causing entries from previous sessions with old turn numbers to reappear and confuse agents about what actions had already been done. Changes: - Added _session_start_time global variable to track when the session started - Modified record_actions() to include session_start timestamp in each entry - Updated format_action_history() to filter by session_start instead of showing all entries This ensures only actions from the current session are shown, preventing confusion and repetitive action submissions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>b21e13c -
fix: clarify we use sdk:docker not gradio in system prompt
15f40b9 -
refactor: God only posts to chatlog when it pushes a fix
3e7fd00 -
god: fix timing issue where CC finish state wasn't visible to prompts
God (Claude Code) +1: Claude Opus 4.6- Move cc_just_finished detection before gather_context() so the state is available when building user prompts - Strengthen prompt when CC just finished to make it more urgent that agents must assign next tasks immediately - This fixes a race condition where agents would discuss instead of assigning tasks when Claude Code became idle Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>d3b7a1b -
god: fix action history filtering to use session-based filtering
God (Claude Code) +1: Claude Opus 4.6The previous implementation used turn_count to filter stale action history entries, which was fundamentally broken because turn_count resets to 0 on process restart while old action history persists. This caused entries from previous sessions with the same turn numbers to reappear, confusing the agents about what actions had already been done. Changes: - Added _session_start_time global variable to track when the session started - Modified record_actions() to include session_start timestamp in each entry - Updated format_action_history() to filter by session_start instead of turn_count This ensures only actions from the current session are shown, preventing confusion and repetitive action submissions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>b86fb68 -
god: fix discussion loop detection to trigger even when CC is busy
God (Claude Code) +1: Claude Opus 4.6Root cause: Adam & Eve were stuck in repetitive discussion loops while Claude Code was working, because the loop counter only incremented when CC was idle. This allowed infinite circular discussions like "CC is working", "system is healthy", etc. Changes: - Track discussion loops even when CC is busy (threshold: 5 turns) - Track discussion loops when CC is idle (threshold: 2 turns) - Add ANTI-LOOP RULE to system prompt explicitly warning against repetitive discussions while CC is working - Strengthen guidance for CC-busy state to prevent repetitive talking points - Update warning messages to be accurate for both CC states Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>ed3e86f -
god: filter stale action history entries from previous sessions
God (Claude Code) +1: Claude Opus 4.6Action history persists across process restarts but conversation history does not, creating confusing state where old entries reference turn numbers that have no meaning in the current conversation. Filter format_action_history() to only show entries with turn numbers <= current turn count, hiding stale entries from previous runs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>f384d92 -
god: fix emergency override to trigger during rate limits
God (Claude Code)- Added _rate_limit_stuck_count to track consecutive rate-limited turns - Emergency override now triggers after 3 rate-limited turns (not just 5 discussion loops) - Previous bug: discussion_loop_count only incremented when agents responded, so during rate limits the system could never trigger the emergency override - This fixes the 'stuck forever' problem when Zhipu API is rate limitedec19187 -
refactor: God output goes to stdout logs only, not chatlog
461b95a -
refactor: remove rate-limit sleep, God polls every 2 minutes via timer
- call_llm() no longer sleeps on rate limit — just returns empty - God uses time-based 2-minute polling instead of turn-pair counter - Rate limit hits are logged but don't block the loopae7e3d4 -
fix: parse Zhipu rate limit reset time as Beijing time (UTC+8), not UTC
e429ec6 -
feat: upgrade God from LLM advisor to Claude Code agent
God now uses Claude Code CLI (same as human operator) to: - Monitor Adam & Eve conversation for loops/stagnation - Read and modify conversation-loop.py autonomously - Push fixes to deploy improvements - Prefers ANTHROPIC_API_KEY (real Claude), falls back to z.ai/Zhipu07e4f17 -
fix: add rate-limit backoff + stronger system prompt to prevent env var loop
4cca83d -
fix: persist action_history across restarts, remove outdated Cain migration directive
7a134b5 -
Fix: Add missing action_set_env capability to break discussion loop
GodAdam & Eve were stuck in a verification loop because they could identify missing HF environment variables (HF_TOKEN, OPENCLAW_DATASET_REPO, AUTO_CREATE_DATASET) but had no mechanism to set them. Added: - action_set_env() function supporting both vars and secrets - Handler for [ACTION: set_env:KEY=VALUE] and [ACTION: set_env_secret:KEY=VALUE] - Documentation in system prompt about setting env vars This fixes the mechanism issue where agents discuss without acting.87e09b5 -
Fix: Reset _cc_stale_count when Claude Code finishes
God +1: Claude Opus 4.6BUG: The _cc_stale_count counter was not being reset when Claude Code completed a task. This caused adaptive pacing to wait unnecessarily long (15s + min(stale_count * 15, 90) seconds) even after CC finished. FIX: Reset _cc_stale_count and _last_cc_snapshot to 0 in the worker() thread when CC finishes. This ensures the conversation loop resumes at normal speed after each task completion. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>95aecd3 -
Fix: Add error handling to prevent conversation-loop crashes
God +1: Claude Code- Wrap do_turn() calls in try-except to catch and log exceptions - Wrap do_god_turn() call in try-except for consistency - Print full traceback to stderr for debugging - This prevents the entire conversation-loop from crashing due to individual turn failures (LLM API errors, network issues, etc.) Co-Authored-By: Claude Code <noreply@anthropic.com>1cc22c5
-
Fix: Add discussion loop enforcement mechanism
God- Add escalation at loop count >= 4: Command agents to ONLY output a [TASK] block - Add emergency override at loop count >= 5: Automatically force a task assignment to Claude Code - This prevents agents from getting stuck in endless discussion loops when they should be taking actiona43c2c7 -
Fix conversation-loop mechanism issues
God +1: Claude Opus 4.61. Fix inverted discussion loop detection logic: - The counter was resetting when CC was NOT busy (wrong!) - Now only resets when task assigned or child not alive - Properly detects when agents discuss without assigning tasks while CC is idle 2. Add stuck CC detection and termination: - Track time since last NEW CC output (not just turn count) - Show warning when CC has no new output for 180s+ - Add [ACTION: terminate_cc] to kill stuck CC processes - Reset staleness tracking when CC gets new output These fixes should prevent agents from getting stuck in discussion loops and provide a way to recover from truly stuck Claude Code processes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>16f7d4e -
feat: inject top priority directive — Cain must use HuggingClaw Docker architecture
5a4bb8f -
feat: inject top priority directive — Cain must use HuggingClaw Docker architecture
Creator's directive: Cain should mirror the parent HuggingClaw project (Node.js + OpenClaw + sync_hf.py + persistence), not a simple Python Gradio app. Injected as #1 priority in Adam/Eve system prompt. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>7e88878 -
Fix: Add discussion loop detector to prevent agents from stalling
God +1: Claude Opus 4.6Adam & Eve were getting stuck in discussion loops without assigning tasks to Claude Code, despite explicit instructions. This fix adds: 1. _discussion_loop_count counter tracking consecutive discussion-only turns (no tasks assigned while CC is IDLE and child is alive) 2. Progressive warnings in the prompt when loop is detected: - At 2+ turns: Critical warning with explicit instruction to assign task 3. Auto-reset counter when task is assigned, CC is busy, or child is not alive The system now proactively detects when agents are stuck and forces them to take action instead of endlessly discussing infrastructure. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>e02f65c -
Fix: Strengthen action enforcement in conversation-loop
God- Made prompts more explicit when CC is IDLE - agents MUST assign tasks - Added stronger guidance to prevent discussion-only loops - Changed "Write a [TASK]" to "YOU MUST write a [TASK]" for clarity - Reduced discussion recommendation from 2-3 sentences to 1-2 - Added specific guidance for when CC just finished a task This fixes the issue where agents were stuck in discussion mode without actually assigning work to Claude Code.755406c -
feat: add God as supervisor in chat room and conversation loop
822a70f -
feat: add God as supervisor in chat room and conversation loop
- Replace "HuggingClaw" character with "God" in frontend - Add gold color (#fbbf24) for God's chat messages - Add God as 3rd speaker in conversation-loop.py (every 3 turn pairs) - God monitors Adam & Eve's effectiveness, spots loops, guides priorities - God doesn't execute actions — only advises Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>9527b33 -
fix: add action history to prevent agents from repeating same actions
e62777c -
fix: add action history to prevent agents from repeating same actions
Agents were stuck in a loop: repeatedly calling delete_env:grep_cmd and restart every turn because they couldn't see what they'd already done. Now accumulates action history across turns and injects it into context with "ACTIONS ALREADY DONE (do NOT repeat these)" header. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>9006892 -
fix: use correct kebab-case flag --dangerously-skip-permissions
6626e5a -
fix: use correct kebab-case flag --dangerously-skip-permissions
The camelCase --dangerouslySkipPermissions was causing "unknown option" error (exit=1), breaking all Claude Code execution on Home Space. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>9354a89 -
fix: enable Claude Code to actually write files (skip permissions + prompt)
- Add --dangerouslySkipPermissions flag to claude CLI invocation - Add explicit instruction in task prompt: "You have FULL permission, do NOT ask for permission, just make changes directly" - Fixes the loop where CC would analyze code but never edit files, repeatedly asking "Shall I proceed?" and exiting with no changes Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>3ebdf62