You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CLI: bb thread spawn inside a thread errors with required option '--project' instead of inferring the calling thread's project #2223
Running bb thread spawn from inside an existing bb thread fails with error: required option '--project <id>' not specified, even though the
calling process has full ambient context (BB_THREAD_ID, BB_PROJECT_ID, BB_ENVIRONMENT_ID) that identifies the project unambiguously.
The spawn help text says omitted execution flags use "remembered project
defaults", but nothing is remembered for a fresh agent shell inside a thread,
so every in-thread delegation must hand-thread --project manually.
Repro
Open any bb thread and get an agent shell inside it (the environment sets BB_THREAD_ID, BB_PROJECT_ID, BB_ENVIRONMENT_ID).
Run:
bb thread spawn --prompt "hello" --json
Observe:
error: required option '--project <id>' not specified
Re-run with --project "$BB_PROJECT_ID" and it succeeds.
Expected
Inside a thread, spawn should default --project (and reasonably --environment) from the calling thread's context, so bb thread spawn --prompt "..." --parent-self just works.
Why it matters
Thread-to-thread delegation is a core agent workflow; this turns every
delegation call-site into boilerplate and fails hard instead of degrading to
an inferred default.
Still present on bb 0.49.0 and on main at 030b1b729. apps/cli/src/commands/thread/spawn.ts:342 still declares --project with requiredOption. The error now gives the fix:
error: required option '--project <id>' not specified
This thread's project is proj_personal; add --project proj_personal.
So the CLI already resolves the project from BB_THREAD_ID. It uses that only for the hint, not as a default. A possible fix: change to .option("--project <id>") and use the same resolved project when the flag is missing and BB_THREAD_ID is set. Keep the error outside a thread.
Activity
lanjak commentedon Nov 12, 2026
Still present on bb 0.49.0 and on main at 030b1b729.
apps/cli/src/commands/thread/spawn.ts:342still declares--projectwithrequiredOption. The error now gives the fix:So the CLI already resolves the project from
BB_THREAD_ID. It uses that only for the hint, not as a default. A possible fix: change to.option("--project <id>")and use the same resolved project when the flag is missing andBB_THREAD_IDis set. Keep the error outside a thread.