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
docs(gemini-task): Gemini works independent packages in parallel, in one PR - #12462
Gemini works independent packages in parallel, in one PR (owner, 2026-10-30). When a brief task has two or more packages marked independent, Gemini in the owner's agy session acts as coordinator: one agy subagent per package (invoke_subagent), at most eight at a time (the owner says when the quota runs short), each in its own Git worktree on a package branch gemini/<slug>-<k> that it pushes before it ends, without a PR or changelog fragment. The coordinator then merges the package branches with git merge --no-ff into gemini/<slug>, runs every package's acceptance and the gates on the result, writes one fragment, and opens one draft PR, because every PR costs a Copilot round, a fragment, CI, a merge, and a deploy. Coupled packages still run one after another on gemini/<slug>. One start line, /gemini-task <slug>, covers every package. Claude reviews per merge commit, so a drifted package stands out, and deletes the package branches after the merge. Without worktree isolation Gemini falls back to sequential work instead of letting two agents share the clone.
Basis: a multi-agent research run against the Antigravity docs (23 of 24 sampled claims verified against their sources). Subagents run concurrently, start without the parent's conversation, can each get an isolated Git worktree, and report back; agy deletes the worktree when the subagent ends, hence push-before-finish. /teamwork (fixed roles, paid plans) builds in ~/teamwork_projects/<project> with no branches or PRs in its docs, so the skill rules it out for this repository. The docs give no concurrency limit and no quota figures, so the cap of eight is a starting value. Parallel agents inside the owner's own session are a documented product feature; the FAQ's ban covers a third-party agent driving agy, which stays in force.
agy-permissions.json gains the git -C <clone> allow and deny forms (Gemini runs Git with absolute paths, and agy matches prefixes word by word), [ and false, and git merge --no-ff for the coordinator, while merging main stays denied. Regex denies close pushes whose refspec destination is main (gemini/foo:main), bulk pushes, and remote deletions, which a gemini/ prefix allow would otherwise let through (Copilot, high). It equals the owner's live settings.
Correction: the 2026-10-16 forum reply on topic 189905 is not marked as Google staff, so the skills, the guardrails, and the gemini_review.py docstring no longer call it one; Google's FAQ remains the authority.
Two Copilot rounds addressed: coupled package agents continue on the shared branch, packages are matched by an exact <slug>-<number>.md, one coordinator session per task, single commands in the gate block, and the brief template's branch line by package kind.
Plan
N/A
Test plan
tests/unit/test_agent_instructions.py: 36 passed
ruff check and ruff format --check on gemini_review.py (docstring only)
agy-permissions.json is valid JSON and equals the owner's live permissions block with the home path generalised
uv run python -m tools.changelog check --base origin/main
Unverified until the first multi-package brief: whether the CLI's invoke_subagent offers the worktree mode (the CLI docs do not describe it; the CLI changelog v1.2.10 mentions subagent worktrees)
No Gemini Flash check: instruction files, a JSON reference, a docstring, and a changelog fragment only
The owner wants Gemini to scale out when there is work for several agents.
Research against the Antigravity docs (2026-10-30): agy subagents
(invoke_subagent) run concurrently, start without the parent's history,
can each get an isolated Git worktree that agy deletes when they end;
/teamwork builds in ~/teamwork_projects/<project> without branches or PRs.
- Briefs mark packages independent or coupled; one start line,
/gemini-task <slug>, covers every package.
- Gemini as coordinator starts one subagent per independent package, at
most four at a time, each in its own worktree on gemini/<slug>-<k>,
pushing and opening its draft PR before it ends; without worktree
isolation it falls back to one package after another.
- agy-permissions.json gains the git -C <clone> forms the owner's live
settings already carry.
- The 2026-10-16 forum reply is not marked as Google staff; the FAQ is the
authority (skills, guardrails, gemini_review.py docstring).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ecks
Gemini chained the brief's acceptance commands into one line with cd ..
and a [ ... ] test; agy asked for those two pieces.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Approval is blocked by an unaddressed critical permission-rule bypass that could allow pushes directly to the protected branch, along with several documentation and workflow inconsistencies.
This PR expands the Gemini task workflow to run independent packages in parallel through isolated agy subagents while keeping coupled packages sequential. It also updates Git permissions, safety guidance, provenance wording, and changelog documentation.
Owner, 2026-10-30: subagents should not open one PR each (every PR costs
a Copilot round, a fragment, CI, a merge, and a deploy), and the limit may
go higher. Subagents now push package branches gemini/<slug>-<k> without a
PR or fragment; the coordinator merges them with git merge --no-ff into
gemini/<slug>, runs the gates on the result, writes one fragment, and opens
one draft PR. Claude reviews per merge commit and deletes the package
branches after the merge. agy rules allow git merge --no-ff and deny
merging main.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MarkusNeusinger
changed the title
docs(gemini-task): Gemini works independent packages in parallel
docs(gemini-task): Gemini works independent packages in parallel, in one PR
Oct 29, 2026
In the first live brief run agy asked the owner for every chained check
with subshells, command substitution, or || true; single commands match
the permission rules.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… flow
Copilot review of #12462:
- A prefix allow such as git push origin gemini/ also matched
gemini/foo:main. Regex denies now catch any refspec whose destination is
main, and --all, --mirror, --delete, --tags, --prune, and ':branch'
deletions (the owner's live settings carry the same rules).
- The brief template names the package branch gemini/<slug>-<k> for
independent packages and gemini/<slug> for coupled ones.
- One start line per task: the session is the coordinator; coupled
packages run one fresh subagent at a time in its workspace, so the
per-package fresh start holds without new sessions.
- The package glob is <slug>-[0-9]*.md, so another task's brief with the
same prefix stays out.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Active critical and moderate findings remain in the task workflow and permission configuration, including unsafe package matching, incorrect coupled-branch handling, an unsplit approval-triggering gate, and an overly broad directory-change allow rule.
On the merged branch every package's 'only my files changed' check sees
the other packages' files; gates and tests run on the merged result, path
checks per package branch.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ge match
Second Copilot round on #12462:
- A coupled package's subagent continues on the tip of gemini/<slug>
instead of starting a fresh package branch from origin/main, which would
have dropped the previous packages' commits.
- cd .. leaves the allow list (live settings and reference): the absolute
clone paths cover every needed cd, and a prefix match could otherwise
move Gemini out of the clone.
- Packages are found with find -regex '<slug>-[0-9]+\.md', so
<slug>-1-other.md stays out; the clean-up step uses the same match.
- The gate block lists one command per line; app/ gates run one by one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The new git -C allow entries are prefix-based, so a command such as git -C /home/<user>/projects/anyplot-agy/../anyplot add ... begins with the allowed clone path but resolves to the shared checkout. That bypasses the dedicated-clone rule and reintroduces the path-traversal problem that was removed for cd ..; constrain these rules to the exact clone path (or explicitly deny traversal) before relying on them for isolation.
This issue also appears in the following locations of the same file:
Copilot (third round, low): the coordinator needs an explicit step to
reach gemini/<slug> before merging the package branches.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Gemini works independent packages in parallel, in one PR (owner, 2026-10-30). When a brief task has two or more packages marked
independent, Gemini in the owner's agy session acts as coordinator: one agy subagent per package (invoke_subagent), at most eight at a time (the owner says when the quota runs short), each in its own Git worktree on a package branchgemini/<slug>-<k>that it pushes before it ends, without a PR or changelog fragment. The coordinator then merges the package branches withgit merge --no-ffintogemini/<slug>, runs every package's acceptance and the gates on the result, writes one fragment, and opens one draft PR, because every PR costs a Copilot round, a fragment, CI, a merge, and a deploy. Coupled packages still run one after another ongemini/<slug>. One start line,/gemini-task <slug>, covers every package. Claude reviews per merge commit, so a drifted package stands out, and deletes the package branches after the merge. Without worktree isolation Gemini falls back to sequential work instead of letting two agents share the clone.Basis: a multi-agent research run against the Antigravity docs (23 of 24 sampled claims verified against their sources). Subagents run concurrently, start without the parent's conversation, can each get an isolated Git worktree, and report back; agy deletes the worktree when the subagent ends, hence push-before-finish.
/teamwork(fixed roles, paid plans) builds in~/teamwork_projects/<project>with no branches or PRs in its docs, so the skill rules it out for this repository. The docs give no concurrency limit and no quota figures, so the cap of eight is a starting value. Parallel agents inside the owner's own session are a documented product feature; the FAQ's ban covers a third-party agent driving agy, which stays in force.agy-permissions.jsongains thegit -C <clone>allow and deny forms (Gemini runs Git with absolute paths, and agy matches prefixes word by word),[andfalse, andgit merge --no-fffor the coordinator, while mergingmainstays denied. Regex denies close pushes whose refspec destination ismain(gemini/foo:main), bulk pushes, and remote deletions, which agemini/prefix allow would otherwise let through (Copilot, high). It equals the owner's live settings.Correction: the 2026-10-16 forum reply on topic 189905 is not marked as Google staff, so the skills, the guardrails, and the
gemini_review.pydocstring no longer call it one; Google's FAQ remains the authority.Two Copilot rounds addressed: coupled package agents continue on the shared branch, packages are matched by an exact
<slug>-<number>.md, one coordinator session per task, single commands in the gate block, and the brief template's branch line by package kind.Plan
N/A
Test plan
tests/unit/test_agent_instructions.py: 36 passedruff checkandruff format --checkongemini_review.py(docstring only)agy-permissions.jsonis valid JSON and equals the owner's livepermissionsblock with the home path generaliseduv run python -m tools.changelog check --base origin/maininvoke_subagentoffers the worktree mode (the CLI docs do not describe it; the CLI changelog v1.2.10 mentions subagent worktrees)🤖 Generated with Claude Code