Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 23 additions & 4 deletions .claude/orchestrator.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,34 @@
"workers": {
"claude": {
"command": "claude",
"args": ["--permission-mode", "bypassPermissions", "--model", "opus"],
"args": ["--permission-mode", "bypassPermissions"],
"models": {
"default": { "model": "opus" },
"cheap": { "model": "sonnet" },
"deep": { "model": "opus", "args": ["--effort", "max"] }
},
"interactive": true,
"notes": "The prompt is the ticket body (D2). Model routing: opus for cross-repo, parity-bound, contract-touching or hard tickets; sonnet for proven-isolated slices; flip per ticket via the ticket's worker:sonnet label. The mode MUST be bypassPermissions, never acceptEdits: acceptEdits auto-approves file writes only, so every shell command still prompts, and a worker with nobody at the keyboard is stuck. Measured on the ORB-75 Phase 7 run, where git switch, dotnet build/test/format, gh and orca were all denied and the worker delivered files with zero gates run, zero commit and zero PR. There is deliberately no -p here either: headless mode is invisible to Orca, so the worktree card shows no Agents row and clicking it reveals a bare shell. The worker runs as a TUI, which means orca terminal wait must use --for tui-idle, never --for exit. One more thing a TUI worker needs answered for it: a brand-new worktree is a folder Claude Code has never seen, so its first screen is the workspace-trust gate (Quick safety check: Is this a project you created or one you trust? with 1. Yes, I trust this folder). Measured on the 2026-07-24 ORB-75 launch, where orca terminal wait --for tui-idle returned satisfied: false with blockedReason codex-trust-workspace and the worker sat on that screen with nobody at the keyboard. Same failure class as the permission mode above: the fix is to send 1 and Enter and wait again, which tools/launch-worker.mjs now does on every launch. Two more things measured on that same run, both about talking to a live worker. First, never orca terminal send to a worker that is not tui-idle: a send issued mid-turn is not delivered as a user turn at all. In the worker's own session transcript it appears only as four type: queue-operation records, never as a type: user entry, and the running turn was cut short on the mid-flow sentence Now the auth-side signup tests., leaving 14 modified and 7 untracked files with zero commits, zero gates and no PR. Everything a worker needs belongs in the prompt FILE at launch; mid-run information is appended to that file and pointed at, which is what tools/nudge-worker.mjs enforces by refusing to send while the terminal is busy. Second, tui-idle means stopped, not done: the same run read satisfied: true as completion when the worker had abandoned the task with nothing committed. Idle is a trigger to run tools/worker-status.mjs, which derives the verdict from commits, push, PR and Linear state, never a report of success."
"notes": "The prompt is the ticket body (D2). Model routing: the default is opus, tier:cheap selects sonnet, and tier:deep selects opus with --effort max so hard work gets a distinct invocation without changing the no-label default. The legacy worker:sonnet label is rejected loudly with remediation to use tier:cheap. The mode MUST be bypassPermissions, never acceptEdits: acceptEdits auto-approves file writes only, so every shell command still prompts, and a worker with nobody at the keyboard is stuck. Measured on the ORB-75 Phase 7 run, where git switch, dotnet build/test/format, gh and orca were all denied and the worker delivered files with zero gates run, zero commit and zero PR. There is deliberately no -p here either: headless mode is invisible to Orca, so the worktree card shows no Agents row and clicking it reveals a bare shell. The worker runs as a TUI, which means orca terminal wait must use --for tui-idle, never --for exit. One more thing a TUI worker needs answered for it: a brand-new worktree is a folder Claude Code has never seen, so its first screen is the workspace-trust gate (Quick safety check: Is this a project you created or one you trust? with 1. Yes, I trust this folder). Measured on the 2026-07-24 ORB-75 launch, where orca terminal wait --for tui-idle returned satisfied: false with blockedReason codex-trust-workspace and the worker sat on that screen with nobody at the keyboard. Same failure class as the permission mode above: the fix is to send 1 and Enter and wait again, which tools/launch-worker.mjs now does on every launch. Two more things measured on that same run, both about talking to a live worker. First, never orca terminal send to a worker that is not tui-idle: a send issued mid-turn is not delivered as a user turn at all. In the worker's own session transcript it appears only as four type: queue-operation records, never as a type: user entry, and the running turn was cut short on the mid-flow sentence Now the auth-side signup tests., leaving 14 modified and 7 untracked files with zero commits, zero gates and no PR. Everything a worker needs belongs in the prompt FILE at launch; mid-run information is appended to that file and pointed at, which is what tools/nudge-worker.mjs enforces by refusing to send while the terminal is busy. Second, tui-idle means stopped, not done: the same run read satisfied: true as completion when the worker had abandoned the task with nothing committed. Idle is a trigger to run tools/worker-status.mjs, which derives the verdict from commits, push, PR and Linear state, never a report of success."
},
"codex": {
"command": "codex",
"args": ["-c", "windows.sandbox=\"unelevated\"", "-c", "model_reasoning_effort=\"high\"", "-m", "gpt-5.6-sol", "--dangerously-bypass-approvals-and-sandbox"],
"args": ["-c", "windows.sandbox=\"unelevated\"", "--dangerously-bypass-approvals-and-sandbox"],
"models": {
"default": {
"model": "gpt-5.6-sol",
"args": ["-c", "model_reasoning_effort=\"high\""]
},
"cheap": {
"model": "gpt-5.6-luna",
"args": ["-c", "model_reasoning_effort=\"low\""]
},
"deep": {
"model": "gpt-5.6-sol",
"args": ["-c", "model_reasoning_effort=\"max\""]
}
},
"interactive": true,
"notes": "Requires a paid ChatGPT plan plus codex login; a headless session can start that itself with codex login --device-auth, which prints a URL and a one-time code for the account owner to enter. CODEX_HOME DECIDES WHETHER A WORKER IS LOGGED IN, and it is the first thing to check before believing any auth verdict: Orca redirects codex's home for the terminals it spawns, so on this machine the real credential is C:\\Users\\thoma\\AppData\\Roaming\\orca\\codex-runtime-home\\home\\auth.json, not the default ~/.codex/auth.json. Measured 2026-07-27: a shell that had lost CODEX_HOME reported 'Not logged in' and codex doctor reported 'no Codex credentials were found', while the very same CLI in an Orca terminal in the same worktree reported 'Logged in using ChatGPT' minutes earlier. For an unattended worker those two states are indistinguishable from having no plan at all, and the worker dies on a login screen nobody is there to answer. Two consequences. Never diagnose codex auth from an ad hoc shell without printing CODEX_HOME first. And a codex worker that never reaches tui-idle should be suspected of sitting on the login splash: that splash ANIMATES, so the repaint check in tools/launch-worker.mjs now turns it into a loud exit 1 rather than a prompt pointer typed into a sign-in screen. Reads AGENTS.md natively. The invocation is bare codex with no subcommand, which is what codex --help means by 'If no subcommand is specified, options will be forwarded to the interactive CLI'. codex exec is the NON-interactive subcommand and lands in the same unsupervisable place as claude -p, so tools/launch-worker.mjs still refuses it (per-engine headless tokens: exec and its alias e for codex, -p and --print for claude, because codex's -p is --profile, a legitimate interactive flag). Approval and sandbox policy is --dangerously-bypass-approvals-and-sandbox, not the equivalent pair -a never --sandbox danger-full-access, and never --full-auto: --full-auto is -a on-request --sandbox workspace-write, and on-request lets the MODEL decide when to ask a human who is not at the keyboard. The single flag beats the pair because the pair has a half-state: an edit that drops -a never while keeping the sandbox flag silently restores approval prompts to a worker nobody is watching, which is the exact failure this entry exists to prevent. The containment story is the disposable Orca worktree, the same one that justifies claude's bypassPermissions. Everything below was measured on 2026-07-27 against codex-cli 0.145.0 on Windows 11. -c windows.sandbox=\"unelevated\" is load-bearing: Codex's default Windows sandbox is elevated, its setup needs Administrator rights, and the first-run TUI paints 'Set up default sandbox (requires Administrator permissions)' then sits on 'Setting up sandbox... Input disabled until setup completes' forever in a PTY that has no desktop to raise UAC on. Measured still spinning after 2.5 minutes, with orca terminal wait reporting satisfied: true throughout, a false idle. The unelevated fallback (restricted tokens and ACLs, learn.chatgpt.com/docs/windows/windows-sandbox) needs no elevation, and the worker never executes inside it anyway because the bypass flag runs commands unsandboxed. cwd needs no -C: orca terminal create --worktree already starts the TUI in the worktree. Supervision, all measured: a real TUI opens, so the Orca card carries an Agents row and orca terminal wait --for tui-idle has a state to observe. The first screen in a brand-new worktree is codex's own trust gate, 'Do you trust the contents of this directory?', which normally reports blockedReason codex-interactive-prompt. Orca 1.4.156 was also measured retaining codex-trust-workspace on an idle codex terminal that never saw a trust gate. WHY: PR #629 owner adjudication makes that live capture authoritative over the older one-reason-per-engine mapping. It is a preselected list whose own instruction reads 'Press enter to continue', so the answer is Enter ALONE; the 1 then Enter that answers Claude Code's gate left the codex process exited (-1). launch-worker.mjs therefore keeps the trust answer per engine. Never blind-Enter an unrecognised codex screen: a stray Enter meant for one prompt was measured confirming the NEXT one, which is how the Administrator sandbox setup above got selected. Everything the claude entry says about talking to a live worker holds here unchanged: never send to a terminal that is not tui-idle, and tui-idle means stopped, not done, so it is the trigger to run tools/worker-status.mjs, never a report of success."
"notes": "Model routing: the default is gpt-5.6-sol at high reasoning, tier:cheap selects gpt-5.6-luna at low reasoning, and tier:deep selects gpt-5.6-sol at max reasoning. Sol-high is the default because Terra-medium lost two review rounds on ORB-124 / PR #619 due care failures; xhigh and max were held in reserve for this per-ticket routing. The legacy worker:sonnet label is rejected loudly with remediation to use tier:cheap. Requires a paid ChatGPT plan plus codex login; a headless session can start that itself with codex login --device-auth, which prints a URL and a one-time code for the account owner to enter. CODEX_HOME DECIDES WHETHER A WORKER IS LOGGED IN, and it is the first thing to check before believing any auth verdict: Orca redirects codex's home for the terminals it spawns, so on this machine the real credential is C:\\Users\\thoma\\AppData\\Roaming\\orca\\codex-runtime-home\\home\\auth.json, not the default ~/.codex/auth.json. Measured 2026-07-27: a shell that had lost CODEX_HOME reported 'Not logged in' and codex doctor reported 'no Codex credentials were found', while the very same CLI in an Orca terminal in the same worktree reported 'Logged in using ChatGPT' minutes earlier. For an unattended worker those two states are indistinguishable from having no plan at all, and the worker dies on a login screen nobody is there to answer. Two consequences. Never diagnose codex auth from an ad hoc shell without printing CODEX_HOME first. And a codex worker that never reaches tui-idle should be suspected of sitting on the login splash: that splash ANIMATES, so the repaint check in tools/launch-worker.mjs now turns it into a loud exit 1 rather than a prompt pointer typed into a sign-in screen. Reads AGENTS.md natively. The invocation is bare codex with no subcommand, which is what codex --help means by 'If no subcommand is specified, options will be forwarded to the interactive CLI'. codex exec is the NON-interactive subcommand and lands in the same unsupervisable place as claude -p, so tools/launch-worker.mjs still refuses it (per-engine headless tokens: exec and its alias e for codex, -p and --print for claude, because codex's -p is --profile, a legitimate interactive flag). Approval and sandbox policy is --dangerously-bypass-approvals-and-sandbox, not the equivalent pair -a never --sandbox danger-full-access, and never --full-auto: --full-auto is -a on-request --sandbox workspace-write, and on-request lets the MODEL decide when to ask a human who is not at the keyboard. The single flag beats the pair because the pair has a half-state: an edit that drops -a never while keeping the sandbox flag silently restores approval prompts to a worker nobody is watching, which is the exact failure this entry exists to prevent. The containment story is the disposable Orca worktree, the same one that justifies claude's bypassPermissions. Everything below was measured on 2026-07-27 against codex-cli 0.145.0 on Windows 11. -c windows.sandbox=\"unelevated\" is load-bearing: Codex's default Windows sandbox is elevated, its setup needs Administrator rights, and the first-run TUI paints 'Set up default sandbox (requires Administrator permissions)' then sits on 'Setting up sandbox... Input disabled until setup completes' forever in a PTY that has no desktop to raise UAC on. Measured still spinning after 2.5 minutes, with orca terminal wait reporting satisfied: true throughout, a false idle. The unelevated fallback (restricted tokens and ACLs, learn.chatgpt.com/docs/windows/windows-sandbox) needs no elevation, and the worker never executes inside it anyway because the bypass flag runs commands unsandboxed. cwd needs no -C: orca terminal create --worktree already starts the TUI in the worktree. Supervision, all measured: a real TUI opens, so the Orca card carries an Agents row and orca terminal wait --for tui-idle has a state to observe. The first screen in a brand-new worktree is codex's own trust gate, 'Do you trust the contents of this directory?', which normally reports blockedReason codex-interactive-prompt. Orca 1.4.156 was also measured retaining codex-trust-workspace on an idle codex terminal that never saw a trust gate. WHY: PR #629 owner adjudication makes that live capture authoritative over the older one-reason-per-engine mapping. It is a preselected list whose own instruction reads 'Press enter to continue', so the answer is Enter ALONE; the 1 then Enter that answers Claude Code's gate left the codex process exited (-1). launch-worker.mjs therefore keeps the trust answer per engine. Never blind-Enter an unrecognised codex screen: a stray Enter meant for one prompt was measured confirming the NEXT one, which is how the Administrator sandbox setup above got selected. Everything the claude entry says about talking to a live worker holds here unchanged: never send to a terminal that is not tui-idle, and tui-idle means stopped, not done, so it is the trigger to run tools/worker-status.mjs, never a report of success."
}
},
"maxParallelWorktrees": 8,
Expand Down
17 changes: 12 additions & 5 deletions .claude/skills/orchestrate/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,12 @@ fatal to an unattended worker:
TUI is never sent to twice: it settles and re-reads instead, because a second send into a busy
worker is the ORB-75 corruption.

It also applies the model routing orchestrator.json's notes name: a ticket labelled
`worker:sonnet` swaps `--model opus` for `--model sonnet`; every other ticket uses the
configured args verbatim.
It also resolves model routing from the selected engine's `models` map in
orchestrator.json. No tier label selects `default`; `tier:cheap` and `tier:deep` select
the corresponding engine-specific entries. A tier must change the resolved invocation.
Unknown or conflicting tier labels, missing mappings, and identical tier invocations
fail the launch loudly. The legacy `worker:sonnet` label is rejected with remediation to
use `tier:cheap`; it is never silently translated or ignored.

**Why not `claude -p`.** Headless mode is invisible to Orca: it is not a TUI, so the
worktree card shows no Agents row and clicking the card reveals only a bare shell.
Expand Down Expand Up @@ -227,8 +230,12 @@ sandbox... Input disabled until setup completes" forever in a PTY with no deskto
UAC on, while `orca terminal wait` reports `satisfied: true` throughout. The prerequisite
the harness cannot supply is the account: a paid ChatGPT plan and `codex login`
(`codex login --device-auth` works from a headless session, printing a URL and a one-time
code). Making codex the DEFAULT is still a separate decision (D5) and Thomas's call; this
only makes selecting it work.
code). Its model map defaults to gpt-5.6-sol at high reasoning, maps `tier:cheap` to
gpt-5.6-luna at low reasoning, and maps `tier:deep` to gpt-5.6-sol at max reasoning.
Sol-high is the routine default because Terra-medium lost two review rounds on ORB-124 /
PR #619 to care failures. The ADR reserves xhigh and max for per-ticket routing, so
`tier:deep` spends max while the no-label invocation remains high. Model routing does not
change the top-level `worker` selection; D5 keeps that as an explicit configuration decision.

Two consequences of dropping `-p`. The process does NOT exit when the work is done, so
wait with `--for tui-idle`, never `--for exit`. And the permission mode must still come
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ While building or fixing, see something broken, stale, or wrong? Fix it immediat

## The workflow (D1-D9)

Linear is the source of truth for product work in this repo and orbit-api; GitHub Issues holds orbit-landing-page, infra chores, and Dependabot (D1). The ticket is the prompt (D2); one ticket = one repo = one reviewable PR, target under 400 lines (D4), and cross-repo work uses an API ticket blocking a UI ticket. The worker engine lives in `.claude/orchestrator.json` (D5); a `visible-effect` ticket needs final screenshots, a critique artifact, and test output before In Review (D7). `RENDER-CORRECTNESS.md` defines the bounded self-critique after capture. Invoke `tools/` scripts through their skills or agents; after `/next`, run `/orchestrate ORB-N --single`.
Linear is the source of truth for product work in this repo and orbit-api; GitHub Issues holds orbit-landing-page, infra chores, and Dependabot (D1). The ticket is the prompt (D2); one ticket = one repo = one reviewable PR, target under 400 lines (D4), and cross-repo work uses an API ticket blocking a UI ticket. The worker engine and its engine-specific model tiers live in `.claude/orchestrator.json` (D5); a `visible-effect` ticket needs final screenshots, a critique artifact, and test output before In Review (D7). `RENDER-CORRECTNESS.md` defines the bounded self-critique after capture. Invoke `tools/` scripts through their skills or agents; after `/next`, run `/orchestrate ORB-N --single`.

- `/feature`
- `/ticket`
Expand Down
Loading
Loading