Skip to content

Conversation

@stephanj
Copy link

Summary

This PR adds a -p/--print flag to superclaude, supercodex, and supergemini commands that enables non-interactive execution mode.

Why is this needed?

Currently, the super* commands are designed for interactive terminal use - they run docker exec -it with tmux sessions. This works great for human interaction but makes them unsuitable for:

  1. Automation tools like Ralph Runner (a macOS GUI for running PRD tasks)
  2. CI/CD pipelines that need to run agent commands programmatically
  3. Scripting where output needs to be captured and processed
  4. Headless environments without a TTY

When these commands are invoked without a TTY, they fail with "the input device is not a TTY".

What this PR does

  • Adds _run_agent_command_noninteractive() helper function that:

    • Runs docker exec without -it flags (no TTY required)
    • Outputs directly to stdout for capture
    • Returns the exit code for programmatic handling
  • Adds -p/--print flag to:

    • agentbox superclaude -p "prompt"
    • agentbox supercodex -p "prompt"
    • agentbox supergemini -p "prompt"

Example usage

# Interactive mode (default, unchanged behavior)
agentbox superclaude "implement feature X"

# Non-interactive mode (new)
agentbox superclaude -p "implement feature X"

# Capture output in a script
output=$(agentbox superclaude -p "analyze this code" 2>&1)

Test plan

  • Verify -p flag is recognized by all three commands
  • Verify interactive mode still works without -p flag
  • Verify non-interactive mode outputs to stdout
  • Verify Python syntax passes

🤖 Generated with Claude Code

stephanj and others added 3 commits January 20, 2026 09:09
- Fix eza download to use correct architecture mapping (x86_64/aarch64 instead of amd64/arm64)
- Fix delta download to include version in URL and use proper architecture mapping
- Fix glow download to include version and use correct extraction path
- Make setup.sh executable

These fixes resolve download failures on different architectures by ensuring
proper mapping between Docker ARCH and GitHub release naming conventions.

Co-Authored-By: Warp <agent@warp.dev>
- Fix runtime directory path for macOS compatibility
- macOS: Use TMPDIR or fallback to /tmp instead of /run/user/{uid}
- Linux: Keep using standard /run/user/{uid} path
- Use centralized config.socket_dir in container.py for consistency

Co-Authored-By: Warp <agent@warp.dev>
Add non-interactive execution mode for superclaude, supercodex, and
supergemini commands. This allows running agent commands without tmux
and with output directly to stdout, making them suitable for automation
and scripting (e.g., Ralph Runner integration).

- Add _run_agent_command_noninteractive() helper that runs docker exec
  without -it flags
- Add -p/--print flag to superclaude, supercodex, supergemini commands
- When -p flag is used, commands run non-interactively and output to stdout

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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