| name | hubcode |
| description | Hubcode CLI reference for managing agents. Load this skill whenever you need to use hubcode commands. |
Agent Commands
hubcode ls
hubcode ls -g
hubcode ls --json
hubcode run --mode bypassPermissions "<prompt>"
hubcode run --mode bypassPermissions --name "task-name" "<prompt>"
hubcode run --mode bypassPermissions --provider claude/opus "<prompt>"
hubcode run --mode full-access --provider codex/gpt-5.4 "<prompt>"
hubcode run --wait-timeout 30m "<prompt>"
hubcode run --wait-timeout 1h "<prompt>"
hubcode run --detach "<prompt>"
hubcode run -d "<prompt>"
hubcode run --output-schema '{"type":"object","properties":{"summary":{"type":"string"}},"required":["summary"]}' "<prompt>"
hubcode run --worktree feature-x "<prompt>"
hubcode logs <agent-id>
hubcode logs <agent-id> -f
hubcode logs <agent-id> --tail 10
hubcode logs <agent-id> --filter tools
hubcode wait <agent-id>
hubcode wait <agent-id> --timeout 60
hubcode send <agent-id> "<prompt>"
hubcode send <agent-id> --image screenshot.png "<prompt>"
hubcode send <agent-id> --no-wait "<prompt>"
hubcode inspect <agent-id>
hubcode stop <agent-id>
hubcode archive <agent-id>
hubcode archive <agent-id> --force
hubcode delete <agent-id>
hubcode attach <agent-id>
hubcode permit ls
hubcode permit allow <agent-id>
hubcode permit deny <agent-id> --all
hubcode ls --json
hubcode ls -q
Loop Commands
Iterative worker loops: launch a worker agent, verify its output, repeat until done.
hubcode loop run "<worker prompt>" [options]
--verify "<verifier prompt>"
--verify-check "<command>"
--name <name>
--sleep <duration>
--max-iterations <n>
--max-time <duration>
--provider <provider/model>
--verify-provider <provider/model>
--archive
hubcode loop ls
hubcode loop inspect <id>
hubcode loop logs <id>
hubcode loop stop <id>
Schedule Commands
Recurring time-based execution: run a prompt on a cron or interval schedule.
hubcode schedule create "<prompt>" [options]
--every <duration>
--cron <expr>
--name <name>
--target <self|new-agent|id>
--max-runs <n>
--expires-in <duration>
hubcode schedule ls
hubcode schedule inspect <id>
hubcode schedule logs <id>
hubcode schedule pause <id>
hubcode schedule resume <id>
hubcode schedule delete <id>
Chat Commands
Asynchronous agent coordination through persistent chat rooms.
hubcode chat create <name> --purpose "<description>"
hubcode chat ls
hubcode chat inspect <name-or-id>
hubcode chat post <room> "<message>"
hubcode chat post <room> "<message>" --reply-to <msg-id>
hubcode chat post <room> "@<agent-id> <message>"
hubcode chat post <room> "@everyone <message>"
hubcode chat read <room>
hubcode chat read <room> --limit <n>
hubcode chat read <room> --since <duration-or-timestamp>
hubcode chat read <room> --agent <agent-id>
hubcode chat wait <room>
hubcode chat wait <room> --timeout <duration>
hubcode chat delete <name-or-id>
Terminal Commands
Manage workspace terminals: create, inspect, send keystrokes, capture output.
hubcode terminal ls
hubcode terminal ls --all
hubcode terminal ls --cwd ~/dev/myapp
hubcode terminal create
hubcode terminal create --cwd ~/dev/myapp
hubcode terminal create --name "build-runner"
hubcode terminal kill <terminal-id>
hubcode terminal kill abc123
hubcode terminal kill build-runner
hubcode terminal capture <terminal-id>
hubcode terminal capture <terminal-id> --scrollback
hubcode terminal capture <terminal-id> -S
hubcode terminal capture <terminal-id> --start 0 --end 10
hubcode terminal capture <terminal-id> --start -5
hubcode terminal capture <terminal-id> --ansi
hubcode terminal capture <terminal-id> --json
hubcode terminal send-keys <terminal-id> "ls -la" Enter
hubcode terminal send-keys <terminal-id> "echo hello" Enter
hubcode terminal send-keys <terminal-id> C-c
hubcode terminal send-keys <terminal-id> C-d
hubcode terminal send-keys <terminal-id> --literal "raw text"
Special key tokens (interpreted by default, use --literal to send raw):
Enter, Tab, Escape, Space, BSpace, C-c, C-d, C-z, C-l, C-a, C-e
Common pattern — launch a process and interact with it:
id=$(hubcode terminal create --name "my-shell" -q)
hubcode terminal send-keys "$id" "claude" Enter
sleep 5
hubcode terminal capture "$id" --scrollback
hubcode terminal send-keys "$id" "Hello!" Enter
sleep 10
hubcode terminal capture "$id" --scrollback
hubcode terminal send-keys "$id" "/exit" Enter
hubcode terminal kill "$id"
Available Models
Claude (default provider):
--provider claude/haiku — Fast/cheap, ONLY for tests (not for real work)
--provider claude/sonnet — Good for most tasks
--provider claude/opus — For harder reasoning, complex debugging
Codex:
--provider codex/gpt-5.4 — Latest frontier agentic coding model (preferred for all engineering tasks)
--provider codex/gpt-5.4-mini — Cheaper, faster, but less capable
Permissions
Always launch agents fully permissioned. Use --mode bypassPermissions for Claude and --mode full-access for Codex. Always specify the model: --provider claude/opus, --provider codex/gpt-5.4, etc. Control behavior through strict prompting, not permission modes.
Waiting for Agents
Both hubcode run and hubcode wait block until the agent completes. Trust them.
hubcode run waits forever by default (no timeout). Use --wait-timeout to set a limit.
hubcode wait also waits forever by default. Use --timeout to set a limit.
- Agent tasks can legitimately take 10, 20, or even 30+ minutes. This is normal.
- When a wait times out, just re-run
hubcode wait <id> — don't panic, don't start checking logs.
- Do NOT poll with
hubcode ls, hubcode inspect, or hubcode logs in a loop to "check on" the agent.
- Never launch a duplicate agent because a wait timed out. The original is still running.
Composing Agents in Bash
hubcode run blocks by default and --output-schema returns structured JSON, making it easy to compose agents in bash loops and pipelines.
Detach + wait pattern for parallel work:
api_id=$(hubcode run -d --name "impl-api" "implement the API" -q)
ui_id=$(hubcode run -d --name "impl-ui" "implement the UI" -q)
hubcode wait "$api_id"
hubcode wait "$ui_id"