nagent
Spawn a bb thread the way the user launches them. Read this before any
.
Use
for status, tell, wait, inspect, automations. This skill is spawn-only.
Default worker: Codex
,
,
("GPT 5.6 Sol High Fast"); bump to
for larger refactors. Use this unless the user requests otherwise.
Hard rules
- Pass explicitly. The CLI does not infer it from the current thread.
- Never guess provider or model IDs. Lookup, then spawn.
- After spawn: do not , , or focus the new thread unless the user asks. Just launch. Report the thread id. Stop.
- Do not poll, , or read logs unless the user asks.
- Prefer bare . If is set, is fine.
- Check your own mode first. A child can never exceed the parent's permission mode. If this thread is not , is silently downgraded and the worker will ask for approvals.
Recipe
bash
# 0. Pre-flight: must print "full". If not, STOP and tell the user
# "this thread is sandboxed (<mode>); relaunch me in full or spawn from the UI".
scripts/permission-mode.sh "$BB_THREAD_ID"
bb project list --json
bb provider list --json
bb provider models <provider-id> --json
bb thread spawn --json \
--project <project-id> \
--new-environment worktree \
--provider <provider-id> \
--model <model-id> \
--reasoning-level <level> \
--permission-mode full \
--title "Short title" \
--prompt "..."
Add
only when the user says
fast.
Parent / sidebar nest
and
are optional. Use them when it makes sense — not on every spawn.
parents the new thread to the current thread (
). The left sidebar then nests the child under this thread (indented, expandable), like a worker under a manager.
parents it to a specific other thread. Do not combine it with
.
Omit both for a root thread — its own top-level sidebar row, not nested. This is what the user means by "not as your own subagent" or "standalone thread".
When it makes sense: this thread is coordinating the work, the user asked for a worker under this session, or the job is a clear subtask of this thread. Skip it for unrelated one-off work that should sit as its own top-level thread.
bash
# add when it makes sense — not required
--parent-self
is often
in the spawn JSON. The worktree is still creating. That is fine.
Lookup
Project. Match
(e.g.
) in
. Use that
. Confirm
is the repo the user named. Do not hardcode project IDs.
| User says | Provider id |
|---|
| Cursor CLI / Cursor subscription | |
| Codex / Codex subscription / ChatGPT sub | |
| Claude Code | |
Do not use
for "Grok via Cursor CLI". That is Grok Build, a different product.
Model + reasoning. From
bb provider models <id> --json
. Use the catalog
. Match the user's words to
and supportedReasoningEfforts[].description
. Those two are not the same field.
If the user does not name a reasoning level, use that model's
from the catalog. Do not pick extra high or max on your own. Example: Claude Code Fable 5 defaults to
.
Known mappings (re-fetch if spawn rejects them)
Cursor CLI — Grok 4.6 Extra High Fast
User: "Grok 4.6 extra high fast (via Cursor CLI subscription)"
bash
--provider acp-cursor \
--model cursor-grok-4.6-medium \
--reasoning-level xhigh \
--service-tier fast
Traps:
- The model id stays even for Extra High. Extra High is a reasoning value, not a different model id.
- On this catalog, displays as Fast. displays as Extra High.
- "Extra High Fast" = plus . Fast-the-reasoning-label and Fast-the-service-tier are different flags.
- Cursor ACP has no permission mode. Use or .
- Do not pass Cursor Task-tool slugs like
cursor-grok-4.6-high-fast
. Those are not bb model ids.
Codex — GPT 5.6 Sol Max
User: "GPT 5.6 Sol Max, via the Codex subscription"
bash
--provider codex \
--model gpt-5.6-sol \
--reasoning-level max
Traps:
- Use native , not (opencodex routed through Cursor).
- Max is , not a model id suffix.
- Codex supports permission mode. Still use when the worker must hit prod, network, or leave the sandbox.
- Pass only if the user asks for fast on Codex too.
Worktree
--new-environment worktree
is the bb-managed worktree. Do not create a git worktree by hand unless the user says so.
- New worktrees get tracked files only.
- Untracked files () copy only if the repo has .
- Optional: . Omit to use the project's default.
- Do not combine with an existing id.
For repos that must keep
in worktrees, the repo needs
plus optional
. Details:
.
Prompt
The worker starts blind. It does not see this chat. Write the full brief into
.
Include:
- Objective — one sentence.
- Constraints — read-only vs implement; no git push; no prod writes.
- Skills / files to use — name them. Skills do not carry over. Example: prod reads →
~/.claude/skills/<read-prod-skill>/SKILL.md
.
- Deliverable — what to return.
- Validation — how it knows it is done.
- Report back — concise report only, or diff + files changed.
Read-only jobs must say
no code changes, no git writes, no database writes in the prompt, even if permission mode is
.
Use a heredoc so quotes survive:
bash
--prompt "$(cat <<'EOF'
Objective: ...
Constraints: READ ONLY. ...
Deliverable: ...
Report back: ...
EOF
)"
Permission mode
| Mode | Meaning |
|---|
| Sandbox on. The user approves escalations. |
| Sandbox on. Provider auto-approves. Codex/Claude have this. Cursor ACP does not. |
| No sandbox. Needed for prod DB, many network tools, and "just go". |
Default for the user's investigation/build workers:
, with the prompt forbidding writes when the job is read-only.
Cursor fallback. bb does not pass
to
; in any non-
mode Cursor's own allowlist decides (
~/.cursor/cli-config.json
→
). "Not in allowlist: git -C" means a subcommand-level entry like
. Fix once: use
(any git subcommand) plus common read-only tools (
,
,
,
,
,
,
). Trap: a project-level
overrides the global file and brings prompts back.
After spawn
Verify the child actually got
(a sandboxed parent downgrades it silently):
bash
scripts/permission-mode.sh <child-thread-id> # must print "full"
If it prints anything else, say so loudly in the report. Do not report success.
Tell the user, then stop:
- thread id
- title
- project name
- provider + model + reasoning (+ fast if set)
- worktree, yes/no
- read-only vs implement
Do not dump the prompt. Do not open the thread. Do not wait for it.
Unblocking the worker
If bb reports the worker is blocked on a command, file change, or permission, unblock it yourself. Do not wait for the user. Quickly read WHAT it wants to run and WHY (
bb thread interactions list <id> --json
), and if it fits the brief, approve it (
bb thread interactions approve <interactionId> <id>
). Only escalate to the user when the action is destructive, touches prod, or falls outside the brief.
If the subagents you launched with this skill are BLOCKED, and waiting for some input or multi-choice select, make sure to UNBLOCK them yourself when it's obvious, trivial or safe -- only wait for the user when the next step is truly non-obvious.
Archive (only when the user asks)
Do not auto-archive after spawn.
bash
bb thread archive <id> --json
bb thread stop <id>
Archive first, then stop. Archive also archives child threads. Stop frees the agent runtime; the thread history stays.
bash
bb thread unarchive <id> --json
bb thread list --archived
Do not use
unless the user wants it gone forever. Do not use
as a substitute for archive. Hidden is sidebar-only; archive is the lifecycle close-out.
Bulk, one worktree/environment:
bb environment archive-threads <environment-id>
.