Repository navigation
Adds Qwen Code as an experimental worker, reviewer and foreman harness; hands each agent's permissions to its own CLI instead of a scope of brigada's, so a claude worker now defaults to bypassPermissions and a review is no longer read-only by brigada's doing; lets a cancel say why; and bounds a review's requeue during a provider outage. Five store migrations (0073 to 0077) and new settings plan_file_branch, retention_days, permission.<harness>/<model> and read_scope.<harness>/<model>: once a 1.3.0 engine has opened the store, an older binary refuses it. Read the Changed section before you upgrade: the permission defaults are wider. Restart the engine and runner after you upgrade.
Changed
- Permissions belong to the user's harness, and brigada passes them through per agent. An agent's
permission=(or the config keypermission.<harness>/<model>) reaches its CLI as that CLI's own permission flag or argument on claude, codex, opencode, dsh, kimi and qwen-code, and every job grant of the agent carries it, a review's included: brigada no longer sets a tool scope of its own, so a review is no longer read-only by brigada's doing. Claude defaults tobypassPermissions; a foreman turn on codex, opencode and qwen-code never reads it (issue #228). - The agent's
tools=, the config keytools.claude/<model>,init --toolsand the project'sworker_toolsare deprecated aliases ofpermission=. They still read and warn, and a project'sworker_toolsstands in for a claude agent'spermission=on that project's work and fix jobs, as it replaced the worker's scope before; they are removed in the next major version, and aproject.yamlthat usesworker_toolsstays schema 1.brigada initsaves a Claude agent that has no permission with the harness default as its explicitpermission=, andbrigada configshows each agent's resolvedpermission:(issue #228). - The read-scope hook that confines a claude foreman's file reads to its reading checkout is a default the user can turn off per agent, with
read-scope=falseon the--agentorread_scope.<harness>/<model> = falsein the config file (issue #228). - A worker can no longer push its own branch. A task worktree carries no push URL, so the runner is the only path to the remote and only its credentials reach it (issue #228).
- A review runs under the agent's
permission=in every harness, with no read-only default of brigada's. Aqwen-codeagent takes the review class and defaults toimplement,review,answerlike any other,brigada initincluded, and a Kimi review no longer swaps in a read-only agent definition: the runner writes nokimi-readonly.mdany more (issue #228). - A claude agent with no
tools=no longer shows brigada's Go default allowlist as its registered scope: the runner's startup line and the foreman'scapacitytool show what the harness actually runs, the agent'spermission=, and an explicittools=keeps showing its patterns; the capacity snapshot carriespermissionbesidetools.brigada configshows the default oftools.claude/<model>asunset: the claude permission appliesinstead of the allowlist (issue #228).
Added
- The
qwen-codeadapter drives Alibaba's Qwen Code CLI (qwen) as an experimental harness that implements, reviews and answers, its default classesimplement,review,answer.brigada initoffers it, marked experimental, whenqwenis onPATH. Each job runsqwen -pwith stream-json output and--setting-sources user, under the agent'spermission=as--approval-mode, or--dangerously-skip-permissionswhen the agent sets none; checked against 1.0.0-preview.1 (issue #224). An HTTP 402billing_errorthat names a futurequota.reset_atis the subscription's window and cools the account until that reset; a 402 with no usable reset is a spent balance and cools it for eight days, as dsh's does, so neither marks the agent broken (issue #230). qwen-codeis a foreman harness as well, experimental: a foreman turn carries thebrigadaMCP bridge through--mcp-configand--strict-mcp-config, and the attach forks the session onto the client's id. It has no read-only foreman scope, so a foreman on it keeps auto-approve and its read-only confinement is not enforced (issue #226).- A cancel can say why. Each
plan_amendcancel entry may be{task, reason}beside the bare task name or id, andtask_canceltakes an optionalreason, in the foreman's MCP tools and the API alike. Every task an amendment newly cancels records onetask_cancelled_by_amendevent with the plan, the reason verbatim and the caller (foreman or user), andbrigada historyshows the reason. A reason is expected on every cancel; one without is still accepted, as before, and recorded as "no reason given". - A restarted dependent now rebuilds on the land target, or on the waiting landings' ref
refs/brigada/land/<target>, when its dependency already landed (squashed or not) or was cancelled or retired, instead of on the dependency's old result branch, whose landing conflicted. Thetask_base_stalereason names that base. A task base may now be the waiting ref, which the runner fetches by name. plan_file_branch, a project setting (brigada project set,project showand.brigada/project.yaml), names the branch the plan files are pushed to;mainor the repository's default branch name commits them to the default branch. The mirror read the key, but nothing could set it (issue #215).retention_daysin the config file prunes messages and artifacts older than that many days on the engine's sweep; 0, the default, keeps everything, and the event log is never pruned. The engine could prune, but no key set it (issue #217).
Fixed
- A review that failed on infrastructure, such as a DNS outage, was requeued at once and without bound (68 review jobs in 68 minutes on one task). It now rides the infra backoff and three-hour window that work, fix and plan-review jobs use, spending no review retry, round, restart or wake, and a spent window parks the task at
needs_foremanwith the outage as the reason. - A per-model
tools.*key in the machine config wrapped at spaces inbrigada config, splitting a pattern likeBash(go vet:*)across lines; it now wraps at+, where the patterns join (issue #228). - A task restarted while its landing waited at the push gate, or sat for a hand push under
gate_push = never, could not land its reworked head, andbrigada push approvestill pushed the old commit. A restart now forgets that landing and the landings stacked on the same waiting ref, the next landing of the target deletesrefs/brigada/land/<target>before it stacks, and the re-made landings wait at the push gate again (issue #205). Restart the engine and runner after you upgrade. - A dependent whose landing was waiting on a
land_readyre-check or a not-ready retry could land on its dependency's old round after the dependency was rebuilt from a new-r<n>branch. A queued land job is now checked for a stale base when it is leased: it is cancelled and the task parks atneeds_foremanwithtask_base_stale, as a landing the land rule refuses does (issue #205). - The claude adapter sorts the CLI's "You've hit your 5-hour limit" and weekly wordings as limits, so the account cools and the foreman parks until the reset the message names; the reset parser already read the wording's
resets <time> (<zone>)suffix, which the old classification never reached. - A foreman turn's limit cools the account it shares with task workers, as §4.4 says: the workers stop placing on a wall the foreman already hit, the dispatcher serves another tier's agents until the reset, and the status shows every agent of the account cooling. A limit still never counts toward the failure streak.
- The AGENTS box of
brigada topkeeps a zero-capped agent off its rows while the shared account cools or the agent is broken: an agent that can never place was listed as a cooling row the moment its account cooled. The top border'sN offcount carries it as before. - A landing whose push git rejected because the target moved (
! [rejected] … (fetch first)) was sorted as the remote failing, so the task parked under the project's grouped environment wake. It now parks on its own, as the landing's own failure. brigada topandbrigada capacityrefused a--projectthat names a local-path remote (file:/…), and run inside a repository with such an origin they showed every project. They now read a project's identity as the engine does.brigada topleft its idle connections to the engine open after every refresh until the engine's idle timeout closed them; each refresh now closes its own.- A worker tool call cut for the loop watch could end in a split UTF-8 character.
- The
approval_max_tasksusage error said a negative value turns every approval rule off; it turns off the count rule alone, and the error now says so (issue #218). - The coordinator's
plan_rejectadvertisedand_stop_asking, which it ignored; its schema now offers onlyrepo_url,planandversion, and a test holds every coordinator tool's arguments to COMPATIBILITY.md (issue #216). - A quota limit counted toward an agent's failure streak: a success, a limit and then one failure marked the agent broken, since the stored limit job was one of the "last two". The streak now skips limit failures as it skips setup and infra ones (issue #212).
- A spent DeepSeek balance (dsh's HTTP 402
Insufficient Balance) was sorted as a plain limit, so the account cooled for the 30-minute default and walked back into the same wall every half hour while still empty. It is now a kind of its own: the account cools for eight days — the cap a suspect reset is capped at — andbrigada agent resetlifts it once the account is topped up. A foreman turn's balance error marks it limited with an unknown reset, as a limit without a time does, and no balance counts toward an agent's failure streak. - A failed setup's retry spent one of the task's restarts, though §5.7 says it charges none: a spent restart budget stopped the retry, and after one setup retry the work job's own transient restart no longer fired. The retry now spends no restart, and the restart cap neither gates nor counts it (issue #213).
- The check-loop rule could not fire at the default two fix rounds: the round cap was checked first, so the third identical failure went out of rounds and escalated. The loop is now judged before the cap and parks the task as a loop (issue #214).
- The foreman could release a task a plan rule held alone — an amendment's
check_command, class, protected-path or extra-repository hold, or the plan budget — withtask_restart, although plan gates are the user's alone.task_restartandanswernow refuse a held task, andbrigada plan approve(and the coordinator'splan_approve) on a running plan releases its held tasks, as GUIDE §7 already told the user to do; a task still over the budget is held again and named (issue #211).