Skip to content

fix: inbox send loses content when called from subprocess (stdin fallback)#131

Open
Alan5168 wants to merge 2 commits intoHKUDS:mainfrom
Alan5168:fix/inbox-send-stdin-content
Open

fix: inbox send loses content when called from subprocess (stdin fallback)#131
Alan5168 wants to merge 2 commits intoHKUDS:mainfrom
Alan5168:fix/inbox-send-stdin-content

Conversation

@Alan5168
Copy link
Copy Markdown

@Alan5168 Alan5168 commented Apr 8, 2026

Summary

Fixes clawteam inbox send losing message content when called from a subprocess or shell script (e.g., via runtime watch --exec).

Problem

When clawteam inbox send is invoked from a script or subprocess, the content argument may not be passed correctly, resulting in an empty string stored in the event log. This breaks the runtime watch --exec pattern where an executor script needs to respond via inbox send.

Solution

Make the content argument optional. When not provided, read from sys.stdin:

content: Optional[str] = typer.Argument(None, help="Message content", metavar="[CONTENT]")
# ...
if content is None:
    content = sys.stdin.read()

This enables the reliable script pattern:

printf 'result content' | clawteam inbox send team agent

Testing

Verified with:

  • Direct stdin piping: printf 'HELLO' | clawteam inbox send team agent
  • runtime watch --exec loop with executor script: content correctly written to event log ✓

Related Issue

Fixes #130

Alan Li added 2 commits March 20, 2026 00:27
… IPC

- Add strict whitelist protection mode for workspace pruning
- Implement symlink-based dependency sharing (node_modules, .venv)
- Add headless worker wrapper script for non-interactive execution
- Fix environment variable inheritance bug
- 98.8% workspace size reduction for multi-agent teams

Tested with:
- Tavily search API (real-time data, no cache)
- Swarm inbox IPC communication
- Multi-agent team deployments
When clawteam inbox send is called from a subprocess or shell
script (e.g., via runtime watch --exec), the content argument can
be lost. This fix makes content an optional argument that falls
back to reading from stdin, enabling reliable script integration.

Fixes HKUDS#130
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.

fix: inbox send loses content when called from subprocess/script context

1 participant