Repository navigation
Configurable board-agent providers (#377) + Yolo (skip approvals) for workers - #2
Conversation
An admin can now give the Issues agent and the PR agent a provider, model and effort of their own, in Settings - Workers, instead of always starting on the office's default worker. The Queue agent keeps running on the default, as do the tasks it adds. Choices are validated the way the default worker's are, kept in .agent-office/prompts.json, and one the office can no longer start is forgotten on the next boot. The first prompt at a board hires its agent on the choice made for that station, and the sign-in gate follows the provider picked.
…oard agents A "Yolo (skip approvals)" box under the provider in the hire dialog, the default worker and the Issues/PR agents' rows in Settings - Workers. Each provider's row in shared/providers.ts names its CLI's flag, and its adapter puts it on the command line through server/yolo.ts, on resume too: Claude Code --dangerously-skip-permissions, Codex --dangerously-bypass-approvals-and-sandbox (any -a/--ask-for-approval dropped, which Codex refuses alongside it), Cursor --force, Muse --yolo. A flag --agent-args already has, or an alias of it, isn't added twice. Providers without one grey the box out, and the server rejects it there. It's validated with the model and effort (prompts.json, workers.json, the spawn), admin-only where those settings are, toasted to everyone, and a worker in yolo wears a "Yolo" badge on its card, the workers list and its terminal title. A Claude worker in yolo gets hook settings with skipDangerousModePermissionPrompt, so Claude's first-run Bypass Permissions screen doesn't hold it up; if it shows anyway the desk says so. Also folds the copies of a pick in prompts.ts into one helper, and the two settings handlers' parsing of a pick into one. Co-authored-by: chrisbewz <crisbewz@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
base.css's .modal label made it a block, so the flag ran into the label. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
236b27a to
e15c941
Compare
|
Rebased onto docs/agents.md conflict: both sides edited the Codex paragraph. I kept #1's rewritten paragraph (hook trust flow, the
Run locally on Windows:
The full 🤖 Generated with Claude Code |
Adds a --codex-args CLI flag / AGENT_OFFICE_CODEX_ARGS env var whose args reach every Codex worker regardless of the office's default agent. Built on the Yolo box (#2): the yolo/bypass aliases come only from PROVIDER_META.codex.yolo via withYolo, and codex-args.ts dedupes just the other valueless switches (--full-auto, --search, --oss, --no-alt-screen). The Codex launch goes agent-args, --codex-args, the Yolo box, then model/effort, hooks, MCP and --no-alt-screen, so a worker ends up with one bypass flag whichever of them asked for it, and a --yolo in --codex-args drops -a/--ask-for-approval and its value, as the box does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds a --codex-args CLI flag / AGENT_OFFICE_CODEX_ARGS env var whose args reach every Codex worker regardless of the office's default agent. Built on the Yolo box (#2): the yolo/bypass aliases come only from PROVIDER_META.codex.yolo via withYolo, and codex-args.ts dedupes just the other valueless switches (--full-auto, --search, --oss, --no-alt-screen). The Codex launch goes agent-args, --codex-args, the Yolo box, then model/effort, hooks, MCP and --no-alt-screen, so a worker ends up with one bypass flag whichever of them asked for it, and a --yolo in --codex-args drops -a/--ask-for-approval and its value, as the box does. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
An admin can now change, from the office UI and without restarting with CLI flags:
Yolo
Flags. Each provider's row in
src/shared/providers.tsnames its CLI's flag. The adapter puts it on the command line throughsrc/server/yolo.ts, on a fresh start and on every resume, including after an office restart (it's saved inworkers.json):--dangerously-skip-permissions--dangerously-bypass-approvals-and-sandbox(alias--yolo)--force--yoloI checked the Claude Code and Codex flags against the installed CLIs (
claude2.1.307,codex-cli0.163.0). Cursor's and Muse's come from the strip lists already incursor.ts/muse.ts; their CLIs aren't installed here. OpenCode, Grok, DSH, Pi and Custom have no flag, so the checkbox is greyed out with a note, and the server rejects yolo for them.No doubled flags. If
--agent-argsalready has the flag or an alias, it isn't added again. Codex errors if the flag appears twice, and it also refuses it together with-a/--ask-for-approval, so that option is dropped for a worker in yolo (checked against codex 0.163).--codex-args/codex-args.tsisn't on main yet, so its dedupe couldn't be reused.withYolodedupes everything before--, so once that lands it should only need to run after it.Claude's first-run "Bypass Permissions mode" screen. A Claude worker in yolo gets a second hook-settings file with
skipDangerousModePermissionPrompt: true. Claude reads that key from--settingsfor interactive sessions, so the screen doesn't block the worker's first run. If an older Claude still shows the screen, the desk says Waiting on Claude's Bypass Permissions warning (claudeBlocked). The Queue agent keeps--disallowedToolsin yolo too.Validation and permissions. Yolo is checked alongside model and effort: in
OfficePrompts(prompts.json, which also forgets a hand-edited pick that isn't valid), inWorkerManager.spawn, and when restoring workers. Setting it on the default worker or a board agent is admin-only. Ticking it on your own hire follows the hire dialog's own rule, so anyone who can hire can use it.Making the risk visible. Ticking the box shows a red warning next to it. A worker in yolo gets a⚠️ Yolo badge on its desk card, in the workers list, in the 2D view and in its terminal title. Everyone gets a toast when someone hires a yolo worker or an admin sets a pick to yolo.
What inherits the default's yolo. Hires on the default (desk, herald, a dropped card,
office-workershires) and the board agents that run on the default. Queue tasks and meetings always ask.Layout and review
src/server/yolo.tsandsrc/client/ui/yolo.ts/.css.manager.tsstays at its 1029-line ceiling: I merged its two validation blocks into one so it didn't grow.tests/size.test.tspasses.only()helper replaces four hand-written copies of a pick inprompts.ts, and the settings handlers share achoiceOf()parser.docs/agents.md(new Yolo (skip approvals) section),docs/features.md,docs/configuration.md.Tests
tests/yolo.test.ts: the flag for each adapter, fresh and resumed; dedupe against aliases; Codex's-aconflict; Cursor/Muse still stripping these flags from--agent-args; the Claude yolo settings file; providers without a flag.tests/prompts.test.ts: yolo validated and persisted for the default and for the stations.tests/server-dispatch.test.ts: admin toasts and validation, plus a new test where a member account is refused.tests/workers.test.ts: the PR agent hired on Codex in yolo, with no duplicate when--agent-argsalready has--yolo, and resumed after a restart with the flag beforeresume.Verification
npm run typecheck: passes.npm run build: passes. The dev machine is very short on memory, so two attempts died allocating before it went through.npm teston this Windows machine: 565 passed and 61 failed. Pristineorigin/maingives the same failures, test for test. They come from the environment: shebang fake agents can't run on Windows, plus CRLF, symlink andshissues. The one addition to that list is the newworkers.test.tscase, which needs the same fake agents as its 28 failing neighbours. All the other new and changed tests pass here (yolo, prompts, server-dispatch). CI on Ubuntu runs the full suite.Headless Edge screenshots, taken locally:
--dangerously-bypass-approvals-and-sandboxshow under the model and effort;--dangerously-skip-permissions;Both modals are the existing ones, so their ✕ and Esc behaviour is unchanged.
Co-authored-by: chrisbewz crisbewz@gmail.com
🤖 Generated with Claude Code