Repository navigation
Refuse agent words on owner-only autoplan answers - #4201
Merged
Merged
Conversation
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
This was referenced Nov 9, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
An agent's own words can no longer settle a user challenge at the /autoplan gate. Only the owner's words can, and the gate stays open until they arrive.
What changed
gstack-autoplan answernow refuses, withOWNER_REPLY_REQUIRED, a reply given in an agent's own words (--words-by agent:<id>) that would choose aucapproval item not already settled at this revision. That coversrec,as-isand explicituctokens. The error names each item and asks for the owner's words, and nothing is written.ditems in its own words and leave theucitems to the owner.agentWordsinlib/gate-list.ts, replaces the inlinewords_bychecks inlib/approval-citations.tsandlib/autoplan-carry.ts, so the rule lives in one place.docs/unattended.md,docs/troubleshooting.mdand theOWNER_REPLY_REQUIREDsummary describe the new case.Why
Only the owner may settle a user challenge or a round-cap approval. Before this change, an agent that answered with
--words-bycould choose one on its own authority, and the gate recorded it as settled. Carry-forward and plan citations already refused agent words; the answer path did not.Blast radius
The change touches only
gstack-autoplan answerwhen--words-bynames an agent. Owner replies, carried answers and agent answers toditems behave as before. A Captain that relays the owner's words without--words-byis unaffected.Documentation
Status: current. The branch's docs already describe the change, and none needed edits.
Scope: 10 committed files selected by the candidate at base 68b1d05 and head 2edd0c2; nothing staged, unstaged or untracked. Docs that mention
--words-bywere searched across the tracked tree.Documentation health:
docs/unattended.md: Current. It describes theucrefusal for agent words, which matchesanswerGate.docs/troubleshooting.md: Current. TheOWNER_REPLY_REQUIREDentry covers the new case and matcheslib/result-codes.ts.changelog.d/refuse-agent-words-on-user-challenges.md: Current, and accurate against the code.crew/docs/captain.md: Current, and consistent with the change.autoplan/DRIVER.md: Current. It is consistent, but see the coverage debt below.Coverage debt: The
answerline inautoplan/DRIVER.mddoesn't say that--words-byreplies can't settleucitems. It is prompt prose, so it is left to the parent.Diagram drift: None.
Pre-Landing Review
Pre-Landing Review: 2 issues — 0 auto-fixed, 1 asked (0 fixed, 1 skipped), 0 deferred, 1 noted
Gate edits: none detected (4 listed, 1 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)
The review ran once on this head with the full panel the plan picked for gate code: a batched specialist (testing, security, state machines), the Red Team, a native adversarial reader, an outside voice (openai/gpt-6.1-sol) and a targeted money reader. No finding met the blocking floor, so no fix round ran.
Open notes
These are below the blocking floor and are not fixed here. The skipped test gap is a decision made under the crew's spend cap, recorded for GSTA-433.
cap_blockerandcap_delta, and their "is a round-cap approval only the owner can settle" message, have no test. The third new test also branches on whetherd1exists, so it does not pin which agent-decidable item was answered.cap_deferredis aditem, so an agent's own words can still grant another review round throughd<n>b, and an agent-worded earlierdchoice is later applied asby human. Which items are owner-only is outside this change; it goes to the Captain as a follow-up.ucrows recorded before this change still stand and carry forward, becausefinishGateand the earlier-choice map inanswerGateignorewords_by. New answers cannot create such rows.uc-only reply can complete a gate whosep1answer is still in the agent's words. That fails closed later at plan citations and carry-forward.--words-by. An agent that passes its own text as--owner-replyis recorded as the owner. This predates the change.finishGate, whose confirm-round rows carrysettled_by, andgstack-gate decisions --reply, which records no provenance.Exploratory QA
Two smoke probes on this head both passed: the owner-only refusal tests and the adjacent
--words-byauthorship tests intest/autoplan-carry.test.ts. The cap paths named above were not probed.Test results
APPROVALS_RENDER: redacted (repository visibility public); gstack-approvals list shows the full record
Approvals
No approvals recorded for branch refuse-agent-words-on-user-challenges.
Plan: exempt: bug fix
Plan check: exempt bug fix
Agent notes