| name | cloud-coding-agent |
| description | Run long-running coding tasks in cloud environments (Claude Code or Codex), with session teleporting and automatic PR creation. |
| user-invocable | true |
| metadata | {"clawdbot":{"emoji":"☁️","requires":{"anyBins":["claude","codex"]}}} |
Cloud Coding Agent Skill
Patterns for running coding tasks in cloud environments using Claude Code and Codex, with session teleporting and PR workflows.
Routing: Cloud vs Local
Use THIS skill (cloud-coding-agent) when:
- Task will take 30+ minutes (offload to cloud)
- User wants to disconnect while task runs
- Need to create PR directly from cloud
- Running multiple parallel cloud tasks
- User explicitly says "cloud", "remote", or "background in cloud"
Use coding-agent skill instead when:
- Task is quick (< 30 minutes)
- Need PTY mode for interactive terminal (
pty:true)
- Using Clawdbot's bash/process tools directly
- Need
--yolo mode for Codex
- Reviewing PRs locally
- Using OpenCode or Pi Coding Agent
- User explicitly says "local", "here", or "on this machine"
For local execution patterns, see the coding-agent skill which covers:
- PTY mode (
pty:true) for interactive CLIs
- Bash tool parameters (workdir, background, timeout)
- Process tool actions (list, poll, log, write, submit, kill)
- Git worktree patterns for parallel local work
- Progress updates and auto-notify patterns
Claude Code Local Sessions
For local Claude Code sessions with PTY support (recommended for interactive CLI):
Quick One-Shot Task
claude --print "Add error handling to the API calls in src/api.ts"
cd ~/project && claude --print "Refactor the database queries"
Background Session with tmux (Recommended)
SESSION="claude-task-$(date +%s)"
tmux new-session -d -s "$SESSION" -c ~/project "bash"
tmux send-keys -t "$SESSION" "claude --print 'Your long-running task here' 2>&1 | tee task.log" C-m
tmux attach -t "$SESSION"
Resume Previous Session
claude --continue
claude --resume <session-id>
Claude Code Cloud
Claude Code on the web runs tasks asynchronously on Anthropic's secure cloud infrastructure.
Requirements:
- Pro/Max/Team/Enterprise subscription
- GitHub repo connected at claude.ai/code
- Trust prompt acceptance on first use
Send Task to Cloud
From inside Claude Code (interactive session):
& Fix the authentication bug in src/auth/login.ts
From command line:
claude --remote "Fix the authentication bug in src/auth/login.ts"
The task runs in the cloud while you continue working locally.
Monitor Cloud Tasks
/tasks
/remote-env
Teleport Cloud Session to Local
From inside Claude Code:
/teleport
/tp
From command line:
claude --teleport
claude --teleport <session-id>
Requirements for teleporting:
- Clean git state (no uncommitted changes)
- Must be in correct repository (not a fork)
- Branch must be pushed to remote
- Same Claude.ai account
Cloud Session Workflow
1. Start task: & Your task description
2. Monitor: /tasks (or claude.ai/code or iOS app)
3. Cloud executes: clones repo, runs task, pushes branch
4. Review: diff view on web, iterate with comments
5. Complete: teleport back OR create PR from web
Best Practices
Plan locally, execute remotely:
claude --permission-mode plan
& Execute the migration plan we discussed
Run tasks in parallel:
& Fix the flaky test in auth.spec.ts
& Update the API documentation
& Refactor the logger to use structured output
Codex Local Sessions
For local Codex sessions (similar patterns to Claude):
Quick One-Shot Task
codex exec --full-auto "Add input validation to the form handlers"
cd ~/project && codex exec --full-auto "Refactor the database layer"
Note: Use --full-auto for automatic file writes without confirmation prompts.
Background Session with tmux
SESSION="codex-task-$(date +%s)"
tmux new-session -d -s "$SESSION" -c ~/project "bash"
tmux send-keys -t "$SESSION" "codex exec --full-auto 'Your long-running task' 2>&1 | tee task.log" C-m
Resume Session
codex resume --last
codex resume
Codex Cloud (Experimental)
Codex has cloud execution capabilities (marked EXPERIMENTAL in v0.77.0).
Prerequisites
codex login
codex cloud
Submit Task to Cloud
codex cloud exec --env owner/repo "Build REST API for user management"
codex cloud exec --env owner/repo --branch feature/my-feature "Implement OAuth2"
Monitor and Apply Cloud Tasks
codex cloud status task_e_XXXXX
codex cloud diff task_e_XXXXX
codex cloud apply task_e_XXXXX
GitHub Integration
- Comment
@codex fix this bug on GitHub issues
- Codex creates a PR automatically (requires GitHub App setup)
Comparison
| Feature | Claude Code | Codex |
|---|
| Local exec | claude --print "task" | codex exec --full-auto "task" |
| Resume session | claude --continue | codex resume |
| Send to cloud | & task or claude --remote | codex cloud exec --env X |
| Monitor cloud | /tasks or claude.ai/code | codex cloud status <id> |
| Bring to local | claude --teleport | codex cloud apply <id> |
| @mention on GitHub | @claude (via Action) | @codex |
Recommended Workflows
Long-Running Feature Development (Local)
SESSION="feature-$(date +%s)"
tmux new-session -d -s "$SESSION" -c ~/project "bash"
tmux send-keys -t "$SESSION" "claude --print 'Implement user dashboard per docs/dashboard.md' 2>&1 | tee dashboard.log" C-m
tail -f ~/project/dashboard.log
Parallel Tasks with tmux
for task in "auth-tests" "db-refactor" "api-docs"; do
SESSION="task-$task-$(date +%s)"
tmux new-session -d -s "$SESSION" -c ~/project "bash"
done
tmux send-keys -t task-auth-tests-* "claude --print 'Add unit tests for auth module' | tee auth-tests.log" C-m
tmux send-keys -t task-db-refactor-* "codex exec 'Refactor database queries' | tee db-refactor.log" C-m
Issue-Driven Development
ISSUE=$(gh issue view 789 --json title,body --jq '"\(.title)\n\n\(.body)"')
claude --print "Fix this GitHub issue: $ISSUE" 2>&1 | tee issue-789.log
Environment Setup
Codex Cloud Environments
Codex cloud requires environment setup through the web UI or API:
codex login
codex cloud
Claude Code Setup
claude --version
Automation Scripts
Located in scripts/ directory:
auto-cloud-task.sh
Routes tasks to Claude or Codex based on preference:
./scripts/auto-cloud-task.sh "Your task description" [claude|codex]
poll-cloud-completion.sh
Polls Codex cloud task until completion:
./scripts/poll-cloud-completion.sh <task-id> [--auto-apply]
teleport-and-pr.sh
For future Claude teleport support:
./scripts/teleport-and-pr.sh [session-id] --title "PR Title"
Tested Commands (v2.1.19 Claude / v0.77.0 Codex)
| Command | Status | Notes |
|---|
claude --print "task" | ✅ Works | Non-interactive, writes files |
claude --continue | ✅ Works | Resume previous session |
claude --resume <id> | ✅ Works | Resume specific session |
claude --remote "task" | ✅ Works | Creates cloud session, returns URL |
claude --teleport | ✅ Works | Interactive picker of cloud sessions |
claude --teleport <id> | ✅ Works | Teleport specific session |
& task (inside Claude) | 🔬 Untested | Send to cloud from interactive |
/tasks | 🔬 Untested | Lists cloud/background tasks |
codex exec "task" | ⚠️ Partial | Shows code but may not write |
codex exec --full-auto "task" | ✅ Works | Auto-approves file writes |
codex resume | ✅ Works | Interactive session picker |
codex cloud | ✅ Works | TUI for browsing cloud tasks |
codex cloud exec --env owner/repo | ✅ Works | Submits task, returns URL |
codex cloud status <task_id> | ✅ Works | Shows task status |
codex cloud diff <task_id> | ✅ Works | Shows task diff |
codex cloud apply <task_id> | ✅ Works | Applies diff locally |
Tips
- Use tmux for persistent background sessions
- Capture output with
| tee logfile.log
- Include clear success criteria in task descriptions
- For complex tasks, break into smaller sessions
- Check progress with
tail -f or tmux attach