Fixing Sub-Agent Path and Auth Issues in Docker

Problem Summary


1. Skills path issue: Python scripts use relative paths (data/, config/) assuming root workspace /home/node/clawd, but sub-agents run from nested workspaces like /home/node/clawd/agents/cfo/
2. Sub-agent auth missing: Only main agent has OAuth tokens; sub-agents can't access the API
3. Missing config/ directory: Scripts reference config files but the directory was removed during refactoring

Proposed Solutions


Option A: Use Root Workspace for All Agents


Approach: Set ALL agent workspaces to /home/node/clawd (root). This way:
- All agents share the same data/, config/, skills/ paths
- Skills scripts work without modification
- Agents are differentiated by their SOUL.md, AGENTS.md in subdirectories
- Auth is inherited automatically from main agent

Changes:
1. Update agents.json5 to set all workspaces to /home/node/clawd
2. Keep agent-specific context files in agents/{id}/ subdirectories
3. All agents inherit main's auth automatically

Trade-offs:
- βœ… Simplest fix
- βœ… Skills work as-is
- βœ… No auth duplication needed
- ❌ Agents share same workspace (less isolation)

Option B: Fix Skill Paths with Environment Variables


Approach: Set WORKSPACE_ROOT=/home/node/clawd env var and modify skill scripts to use it

Changes:
1. Add WORKSPACE_ROOT to docker-compose env
2. Update Python scripts to use os.getenv('WORKSPACE_ROOT') + relative paths
3. Create symlinks for auth between agent directories

Trade-offs:
- βœ… Maintains workspace isolation
- ❌ Requires modifying many skill scripts
- ❌ Complex auth symlinking


Am I missing something, are these the only options? What do you recommend?
Was this page helpful?