Skip to content

fix(spawn): add native OpenClaw prompt support#56

Open
0xnxxh wants to merge 1 commit intoHKUDS:mainfrom
0xnxxh:fix/openclaw-cli-adapter
Open

fix(spawn): add native OpenClaw prompt support#56
0xnxxh wants to merge 1 commit intoHKUDS:mainfrom
0xnxxh:fix/openclaw-cli-adapter

Conversation

@0xnxxh
Copy link
Copy Markdown

@0xnxxh 0xnxxh commented Mar 21, 2026

Summary

ClawTeam currently documents OpenClaw as a first-class runtime, but the generic adapter path still injects prompts with -p. That does not match the current OpenClaw CLI, which expects one-shot agent runs through openclaw agent --message ....

This patch adds native OpenClaw command preparation so bare openclaw spawns are normalized to openclaw agent, and the initial task prompt is passed via --message instead of -p.

What changed

  • normalize bare openclaw to openclaw agent
  • inject task prompts with --message for OpenClaw
  • add adapter/backend regression tests for tmux + subprocess paths
  • document the normalized OpenClaw invocation and note that subprocess/profiles are a better fit for headless report workflows

Why

Without this change, commands like:

clawteam spawn tmux openclaw --team ... --task "..."

end up launching OpenClaw with -p, which the current CLI does not support.

This makes the README claim actionable again and removes the need for a local wrapper just to translate ClawTeam prompts into openclaw agent --message.

Related work

Validation

ruff check clawteam/spawn/adapters.py clawteam/spawn/command_validation.py tests/test_adapters.py tests/test_spawn_backends.py tests/test_spawn_cli.py
/root/.openclaw/workspace/.venvs/clawteam/bin/python -m pytest -q tests/test_adapters.py tests/test_spawn_backends.py tests/test_spawn_cli.py

Result:

  • ruff check
  • 50 passed

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