feat: add hidden spawn CLI command for container environments#129
Merged
khaliqgant merged 2 commits intomainfrom Jan 10, 2026
Merged
feat: add hidden spawn CLI command for container environments#129khaliqgant merged 2 commits intomainfrom
khaliqgant merged 2 commits intomainfrom
Conversation
When agents run in cloud containers without tmux, they can now use `agent-relay spawn` directly. This command uses the dashboard's POST /api/spawn endpoint (PtyWrapper-based) instead of TmuxWrapper. The command is hidden from help since agents should use the `->relay:spawn` pattern, but the CLI command is available as fallback. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Import SpawnRequest/SpawnResult types for type-safe spawn requests - Add --spawner flag for policy enforcement (who is requesting the spawn) - Add --interactive flag for auth setup flows (disables auto-accept) - Add --cwd flag for working directory specification - Add shadow agent options (--shadow-mode, --shadow-of, --shadow-agent, --shadow-triggers, --shadow-speak-on) - Validate shadow mode values and trigger lists - Display policy denial details on spawn failure - Update dashboard API to accept spawnerName and cwd fields This ensures the CLI spawn command is fully consistent with the SpawnRequest interface and enables policy enforcement when needed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
agent-relay spawnCLI command that uses dashboard API instead of tmux->relay:spawnpatternProblem
When agents in cloud containers ran
agent-relay spawn DeveloperProvisioner claude << 'EOF', they gotTmuxNotFoundErrorbecause:spawncommand existed in CLIspawnas a command to wrap with TmuxWrapperSolution
Added a proper
spawncommand that usesPOST /api/spawn(PtyWrapper-based, no tmux required).Test plan
--helpagent-relay spawn --help🤖 Generated with Claude Code