Skip to content

feat: PicoClaw worker spawner and extended CC session events#17

Merged
DarlingtonDeveloper merged 3 commits into
mainfrom
feat/picoclaw-spawner
Feb 16, 2026
Merged

feat: PicoClaw worker spawner and extended CC session events#17
DarlingtonDeveloper merged 3 commits into
mainfrom
feat/picoclaw-spawner

Conversation

@DarlingtonDeveloper

Copy link
Copy Markdown
Collaborator

Summary

  • Adds process.Spawner that subscribes to swarm.task.*.assigned, filters for runtime: "picoclaw", and spawns picoclaw worker processes with mission directory, briefing JSON, and timeout management
  • Adds PicoClawConfig to config with defaults (binary, mission_base_dir, default_timeout=5m, max_concurrent=20)
  • Extends CCSessionCompletedData with backwards-compatible Model, Runtime, and token count fields emitted by PicoClaw workers
  • Adds SubjectAllTaskAssigned wildcard subject for task assignment subscription
  • Wires spawner into orchestrator main alongside process subscriber

New files

File Purpose
internal/process/spawner.go Task assignment subscriber, picoclaw process lifecycle management
internal/process/spawner_test.go Runtime filtering, concurrency limit, taskAssignment marshal tests
internal/config/config_picoclaw_test.go PicoClaw config defaults and YAML parsing
internal/hermes/picoclaw_test.go Extended CC event fields, backwards compat, subject constant

Test plan

  • go build ./... — clean
  • go vet ./... — clean
  • All existing tests pass
  • New tests: config defaults (2), hermes event fields + backwards compat (4), spawner runtime filter + concurrency limit + serialization (5)
  • Integration: assign a picoclaw-runtime task via NATS, verify worker spawns and mission directory created

🤖 Generated with Claude Code

DarlingtonDeveloper and others added 3 commits February 16, 2026 01:03
Adds a PicoClaw worker spawner that subscribes to task assignment
events (swarm.task.*.assigned), filters for picoclaw runtime, and
spawns picoclaw worker processes with mission directory setup,
briefing JSON, and timeout management. Extends CCSessionCompletedData
with backwards-compatible Model, Runtime, and token count fields
emitted by PicoClaw workers.

New: internal/process/spawner.go, PicoClawConfig in config
Modified: hermes events/subjects, cmd/orchestrator/main.go wiring

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Rename CacheRead/CacheWrite to CacheReadTokens/CacheWriteTokens for
  consistent field naming convention across CCSessionCompletedData
- Redirect worker stdout/stderr to per-task log files in
  .mission/logs/ instead of Warren's stdout (avoids noise with
  concurrent workers)
- Publish fallback swarm.cc.session.completed event from spawner so
  NATS consumers see completions even if picoclaw doesn't publish
  natively
- Document that spawner assumes a forward-looking "picoclaw worker"
  subcommand that doesn't exist yet

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Concurrency is controlled via atomic counter, not mutex. Fixes
golangci-lint unused field error.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@DarlingtonDeveloper DarlingtonDeveloper merged commit b137fde into main Feb 16, 2026
2 checks passed
@DarlingtonDeveloper DarlingtonDeveloper deleted the feat/picoclaw-spawner branch February 16, 2026 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant