Skip to content

Configurable board-agent providers (#377) + Yolo (skip approvals) for workers - #2

Merged
dextah merged 3 commits into
mainfrom
office/gizmo-1fb0
Oct 22, 2026
Merged

dextah merged 3 commits into
mainfrom
office/gizmo-1fb0

Conversation

@dextah

@dextah dextah commented Oct 22, 2026

Copy link
Copy Markdown
Owner

An admin can now change, from the office UI and without restarting with CLI flags:

  1. which provider, model and effort the Issues and PR agents run on. This is upstream Configurable providers for the PR and Issues board agents AgentSystemLabs/agent-office#377 by @chrisbewz, cherry-picked unchanged with its authorship kept.
  2. a new "Yolo (skip approvals)" checkbox for workers hired from the hire dialog, for the default worker, and for each board-agent row in ⚙️ Settings → 🤖 Workers.

Yolo

  • Flags. Each provider's row in src/shared/providers.ts names its CLI's flag. The adapter puts it on the command line through src/server/yolo.ts, on a fresh start and on every resume, including after an office restart (it's saved in workers.json):

    Provider Flag
    Claude Code --dangerously-skip-permissions
    Codex --dangerously-bypass-approvals-and-sandbox (alias --yolo)
    Cursor --force
    Muse --yolo

    I checked the Claude Code and Codex flags against the installed CLIs (claude 2.1.307, codex-cli 0.163.0). Cursor's and Muse's come from the strip lists already in cursor.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-args already 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.ts isn't on main yet, so its dedupe couldn't be reused. withYolo dedupes 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 --settings for 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 --disallowedTools in 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), in WorkerManager.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-workers hires) and the board agents that run on the default. Queue tasks and meetings always ask.

Layout and review

  • New modules: src/server/yolo.ts and src/client/ui/yolo.ts/.css. manager.ts stays at its 1029-line ceiling: I merged its two validation blocks into one so it didn't grow. tests/size.test.ts passes.
  • Two cleanups while reviewing Configurable providers for the PR and Issues board agents AgentSystemLabs/agent-office#377: one only() helper replaces four hand-written copies of a pick in prompts.ts, and the settings handlers share a choiceOf() parser.
  • Docs updated: README, 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 -a conflict; 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-args already has --yolo, and resumed after a restart with the flag before resume.

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 test on this Windows machine: 565 passed and 61 failed. Pristine origin/main gives the same failures, test for test. They come from the environment: shebang fake agents can't run on Windows, plus CRLF, symlink and sh issues. The one addition to that list is the new workers.test.ts case, 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:

    • the hire dialog on Codex with yolo ticked: the warning and --dangerously-bypass-approvals-and-sandbox show under the model and effort;
    • ⚙️ Settings → 🤖 Workers: the default worker on Claude Code with yolo, showing --dangerously-skip-permissions;
    • the PR agent's row opened on Codex with yolo ticked, with ✕ Cancel and Save.

    Both modals are the existing ones, so their ✕ and Esc behaviour is unchanged.

Co-authored-by: chrisbewz crisbewz@gmail.com

🤖 Generated with Claude Code

chrisbewz and others added 3 commits October 22, 2026 13:42
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>
@dextah
dextah force-pushed the office/gizmo-1fb0 branch from 236b27a to e15c941 Compare October 22, 2026 12:29
@dextah

dextah commented Oct 22, 2026

Copy link
Copy Markdown
Owner Author

Rebased onto main after #1 (74270b2). The new head is e15c941. No behaviour changed.

docs/agents.md conflict: both sides edited the Codex paragraph. I kept #1's rewritten paragraph (hook trust flow, the node <data dir>/agent-office-codex-hook.cjs <Event> command and the sh/PowerShell quoting) and added #2's "(unless it's hired in yolo)" note after "preserves native sandbox and approval settings". #2's "Yolo (skip approvals)" section and #1's "Codex on Windows and hook troubleshooting" section are both still there.

src/server/providers/codex.ts and README.md merged automatically. codex.ts has #1's hook args and bootHint, plus #2's withYolo call before resume.

Run locally on Windows:

  • npm run typecheck passed.
  • The targeted tests (size, yolo, prompts, codex, codex-hook-shell, codex-hook-transport, server-dispatch) all passed, 38 of 38.
  • npm run build:server passed.
  • npm run build:client (vite) failed twice with memory allocation ... failed, because the machine is out of memory. That's an environment problem, not a build error. CI's npm ci runs the full build on Ubuntu.

The full npm test suite wasn't run locally, so it's left to CI.

🤖 Generated with Claude Code

@dextah
dextah merged commit d498e46 into main Oct 22, 2026
2 checks passed
dextah added a commit that referenced this pull request Oct 22, 2026
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>
dextah added a commit that referenced this pull request Oct 22, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants