Summary
Hive agents work on repositories other than hive's own, and those repositories
state their local rules in AGENTS.md β the cross-tool convention hive already
reads and injects into a kick. When hive's own prompt and the repository's
AGENTS.md disagree, nothing tells the agent which one wins, and hive's
wording is consistently the more forceful of the two. The agent follows hive.
On projectbluefin/bluefin, whose AGENTS.md says "All pull requests target
testing. Never open a content PR against main", hive agents opened PRs
against main and failed the repo's base-branch gate. On
projectbluefin/common and projectbluefin/review, hive titled PRs
[scanner] fix: β¦ and failed those repos' conventional-commit title gates.
Four bot PRs in one night, all dead on arrival. None of them a model error β
the agents did precisely what hive instructed.
Blast radius: every repository hive serves that is not hivecommons/hive.
Nothing here is agent behavior; it is prompt and precedence text.
What the agent actually sees
agentsmd.InjectionText (src/pkg/agentsmd/agentsmd.go:330) renders the
repository's AGENTS.md under a bare header and nothing else:
# Repository Agent Instructions (AGENTS.md)
<the repo's body>
There is no statement that these instructions outrank hive's own. They arrive
as undifferentiated prose.
Hive's instructions on the same subject arrive with a verification step
attached. buildTaskPromptBodyForAccess
(src/pkg/dashboard/contribute_ws.go:5767):
Resolve <repo>'s own default branch (gh repo view <repo> --json defaultBranchRef) β¦ Open the PR against the same branch, and confirm the PR's base is that branch before you report done.
and src/pkg/policies/defaults/scanner-holdgated.md:69:
Create a worktree cut from the branch the PR will target β the repository default unless the work names another
Given a doc that says one thing and an imperative with a self-check that says
another, a model follows the imperative. Consistently.
Two instances of the same bug
Base branch. Hive asserts the PR target is the repository default. That is
a guess about a repo's conventions β right for most repos, wrong for any repo
using a promotion model, where the default branch is the released line and
PRs land on an integration branch.
This is the third iteration of the same assumption, and the prior two were both
filed as bugs:
Each fix replaced one wrong assertion with a better one. The remaining gap is
that hive asserts at all, rather than deferring to the repository.
PR title format. The shipped policy templates hardcode
--title "[<lane>] β¦" β 19 of the files under src/pkg/policies/defaults/ do
this, e.g. scanner-holdgated.md:78 and scanner-full.md:71. That is hive's
own house style (this repo has no title gate, so it works here) projected onto
every repo hive touches. Repos enforcing Conventional Commits reject it on the
first character.
AGENTS.md already warns about exactly this class of leak for exactly these
files: "those are embedded into the binary and run against arbitrary repos, so
a hardcoded login there would leak one repo's maintainers into every hive
deployment." A hardcoded title format and a hardcoded base-branch assumption
are the same mistake with a different payload.
The [lane] prefix is load-bearing for issue routing
(src/pkg/classify/classifier.go:253 routes [scanner] β¦ issues back to the
scanner lane). It is not load-bearing for PRs: intent.Classify
(src/pkg/intent/intent.go:144) keys off AgentAuthor, changed file paths and
FeatureSignals keywords, never the title prefix. Removing it from PR titles
only is safe.
Evidence
bluefin's rule, verbatim from its AGENTS.md line 94:
- All pull requests target
testing. Never open a content PR against main.
bluefin's gate output:
BASE_REF: main
HEAD_REF: scanner/fix-add-gstreamer-plugin-gtk4
ERROR: PRs must target 'testing', not 'main'.
common#1127's gate output:
ERROR: PR title does not follow Conventional Commits.
Got: [scanner] fix(bonedigger-report): derive booted image name from live bootc status
Expected: <type>[optional scope]: <description>
Suggested direction
- State precedence in the injection.
InjectionText should declare that
repository-supplied instructions win over hive's defaults on any conflict.
This is the fix; the rest is cleanup.
- Stop asserting repo facts in the defaults. "Open the PR against the base
this repository requires; if its AGENTS.md does not name one, use its
default branch" instead of "confirm the PR's base is defaultBranchRef".
Likewise let the repo's convention drive the title rather than hardcoding
[<lane>].
hive-open-pr already accepts --base (src/docs/hive-open-pr.md:42).
No policy template passes it.
Separately: the contributor relay (src/pkg/dashboard/contribute_ws.go) never
calls primeAgentsMd at all β only the scheduler path does β so on that path
the repository's instructions are not outranked, they are never present. Filing
that on its own since it has a different fix and blast radius.
Summary
Hive agents work on repositories other than hive's own, and those repositories
state their local rules in
AGENTS.mdβ the cross-tool convention hive alreadyreads and injects into a kick. When hive's own prompt and the repository's
AGENTS.mddisagree, nothing tells the agent which one wins, and hive'swording is consistently the more forceful of the two. The agent follows hive.
On
projectbluefin/bluefin, whose AGENTS.md says "All pull requests targettesting. Never open a content PR againstmain", hive agents opened PRsagainst
mainand failed the repo's base-branch gate. Onprojectbluefin/commonandprojectbluefin/review, hive titled PRs[scanner] fix: β¦and failed those repos' conventional-commit title gates.Four bot PRs in one night, all dead on arrival. None of them a model error β
the agents did precisely what hive instructed.
Blast radius: every repository hive serves that is not
hivecommons/hive.Nothing here is agent behavior; it is prompt and precedence text.
What the agent actually sees
agentsmd.InjectionText(src/pkg/agentsmd/agentsmd.go:330) renders therepository's AGENTS.md under a bare header and nothing else:
There is no statement that these instructions outrank hive's own. They arrive
as undifferentiated prose.
Hive's instructions on the same subject arrive with a verification step
attached.
buildTaskPromptBodyForAccess(
src/pkg/dashboard/contribute_ws.go:5767):and
src/pkg/policies/defaults/scanner-holdgated.md:69:Given a doc that says one thing and an imperative with a self-check that says
another, a model follows the imperative. Consistently.
Two instances of the same bug
Base branch. Hive asserts the PR target is the repository default. That is
a guess about a repo's conventions β right for most repos, wrong for any repo
using a promotion model, where the default branch is the released line and
PRs land on an integration branch.
This is the third iteration of the same assumption, and the prior two were both
filed as bugs:
main, repository default never consultedEach fix replaced one wrong assertion with a better one. The remaining gap is
that hive asserts at all, rather than deferring to the repository.
PR title format. The shipped policy templates hardcode
--title "[<lane>] β¦"β 19 of the files undersrc/pkg/policies/defaults/dothis, e.g.
scanner-holdgated.md:78andscanner-full.md:71. That is hive'sown house style (this repo has no title gate, so it works here) projected onto
every repo hive touches. Repos enforcing Conventional Commits reject it on the
first character.
AGENTS.mdalready warns about exactly this class of leak for exactly thesefiles: "those are embedded into the binary and run against arbitrary repos, so
a hardcoded login there would leak one repo's maintainers into every hive
deployment." A hardcoded title format and a hardcoded base-branch assumption
are the same mistake with a different payload.
The
[lane]prefix is load-bearing for issue routing(
src/pkg/classify/classifier.go:253routes[scanner] β¦issues back to thescanner lane). It is not load-bearing for PRs:
intent.Classify(
src/pkg/intent/intent.go:144) keys offAgentAuthor, changed file paths andFeatureSignalskeywords, never the title prefix. Removing it from PR titlesonly is safe.
Evidence
Check PR base branchBASE_REF: main, repo requirestestingCheck PR base branchvalidate[scanner] fix(bonedigger-report): β¦conventional-title[sec-check] fix: β¦bluefin's rule, verbatim from its
AGENTS.mdline 94:bluefin's gate output:
common#1127's gate output:
Suggested direction
InjectionTextshould declare thatrepository-supplied instructions win over hive's defaults on any conflict.
This is the fix; the rest is cleanup.
this repository requires; if its AGENTS.md does not name one, use its
default branch" instead of "confirm the PR's base is
defaultBranchRef".Likewise let the repo's convention drive the title rather than hardcoding
[<lane>].hive-open-pralready accepts--base(src/docs/hive-open-pr.md:42).No policy template passes it.
Separately: the contributor relay (
src/pkg/dashboard/contribute_ws.go) nevercalls
primeAgentsMdat all β only the scheduler path does β so on that paththe repository's instructions are not outranked, they are never present. Filing
that on its own since it has a different fix and blast radius.