Public: anyone can read this; the crew can change it.
Talk proposes the person's copy upstream: a pull request at the origin, its branch pushed there or to their fork there #16403
Check · Review · Land · Live done — Landed and live in production.
proposeupstream { repo, branch? } plans and reads only: the repository at the origin, and whether the branch is pushed into it (the origin says the person may push) or to their fork there (made through the existing fork route when they may only read), in one sentence (upstreamWords).
shipped production is serving it deploy 496afdb
The design is sound: the plan is said before the yes, a stale plan is refused (plan_changed, route_changed), the crew is refused, the origin's default branch is never moved, and the Talk tool is held like every other write. I read the diff; I did not exercise the preview. These changes are needed, all in one round:
- No how-to. The pull adds a feature through Talk, MCP and the terminal, and there is no
docs/features/<name>.md(for exampledocs/features/propose-upstream.md). Add it: what a person says, what the plan sentence means (branch pushed there vs. to their fork), the title, what comes back, and the terminal entry 'Propose upstream'. Do not put it in README. - Untested behaviour. (a)
GET /api/v1/repos/:owner/:namenow returnspermissions: { push, admin }, andsrc/core/repo_fields.tsallow-lists it. No test asserts it: a reader getspush:false, admin:false, a writerpush:true, and a guest gets false. Add one. (b)ForgeProvidernow parsespermissions(an older forge with none still means push is unknown, sotrue) and has a new pagedlistBranches(cursor form and bare-array form). Neither has a direct test; add unit tests with canned responses. (c)openPull's newroute_changedrefusal and theinput.route === 'direct'branch, which turns an origin refusal into an error instead of a fork fallback, have no test where the origin's answer differs from the plan. (d) The terminal screensrc/tui/screens/proposeupstream.tshas no test beyond the palette roster line. Add a screen test: a plan, then a yes, then a title, then a toast with the address, and the refusal toast for a non-copy. - Wording bug.
upstreamWordsinsrc/origins/words.tsprints 'your fork on GitHub' (a double space and no name) whenintoisforkandforkis null or empty, andproposeUpstreamaccepts such atold. Refuseinvalidin the tool whenintoisforkand the fork name is empty, and never build a fork plan without a name. - Boundary validation.
titlehas no length cap or control-character check at the tool, the TUI orproposeUpstreambefore it goes to a foreign origin's API. Cap it (for example 256 chars, one line).branchis passed toopenPulland on to a push at the origin; validate it as a ref name inplanUpstream(no leading-, no.., no spaces or control characters, bounded length) instead of relying on later layers. - Unrelated churn. The
docstring of thesystemtool insrc/http/mcp/tools/system.tsis rewritten. If it is needed to stay under the 18,500-byte tool-list cap, say so in the pull; otherwise revert it. Runbun scripts/gate.ts --fixand commit what it rewraps (thecatalog.tsdoc comment line is now long). - Fallback in the ask words. In
src/crew/conversation_ask.tsthepropose_upstreamform builds a pseudo-plan withas Argscasts and defaults.asksalready holds the no-plan case, so drop the fallback or return a plain sentence.
Nothing here is a Never; once these land I expect to approve.
The clone has no commit be710dab42fa, so I read the whole change instead of the diff since that head. I found nothing to block.
- Plan and yes: a plan only reads. The yes re-plans and refuses with
plan_changedorroute_changedif the origin now answers differently. The title is one line of at most 256 characters, and the branch is checked withisSafeRef, so it can't become a flag. Agents are refused. - Origin default branch: it is never overwritten. The copy's default branch goes up as
owner/main. - Held writes:
propose_upstreamis held behind a confirm when it carries a plan, and the confirm sentence comes from the plan. It is in the hostile-read test. - Both doors: the terminal screen is in the palette roster,
docs/features/propose-upstream.mdexists, and README is untouched. permissionson repo GET: it reports only the caller's own rights, and a stranger gets false for both. The test covers owner, reader and stranger.- Tests: they cover the direct route, the fork route, the stale plan, refused pushes, bad branch and title input, the provider answers and the terminal flow.
Non-blocking: in ASKED_AS, the branch in the confirm sentence comes from the call's branch argument. Use the plan's own branch if the plan gains one.
propose_upstream { repo, branch? }plans and reads only: the repository at the origin, and whether the branch is pushed into it (the origin says the person may push) or to their fork there (made through the existing fork route when they may only read), in one sentence (upstreamWords). Sent again with thatplanand a title it is held behind a confirm that says the same sentence, and the yes opens the pull request at the origin and answers its address. A plan that no longer holds is refused (plan_changed), andopenPulltakes the told route (route) or refuses (route_changed), never quietly the other way. A branch never goes up under the origin's default branch's name: the copy'smaingoes up asalice/main, so a proposal never moves the origin's default branch.Two provider fixes the two-forge test found, each its own bug on main:
GET /api/v1/repos/:owner/:namenow answerspermissions { push, admin }, the caller's own rights there (canWrite,canAdmin; false for no one signed in), seen only by whoever may read the repository, as the rest of that answer is. The forge provider reads it; an older forge that sends none is still read as "may push", and its refusal falls back to the fork as before.page, which the forge's cursor-paged list refuses (400), so a push to the person's fork on another forge could never start. It now walks{ items, next_cursor }(a bare array from an older forge still reads).The terminal's door is "Propose upstream" (palette, a person's). The
systemtool's line says "admin only" for "a forge admin only" so /llms.txt keeps its budget.Try: in Talk, after "bring <origin link> in" and a change on your copy, say "open a PR upstream"; or call MCP
propose_upstreamwith{ "repo": "<you>/<name>-work" }No look: no page changes; an MCP tool, a terminal screen, Talk's confirm and an API field No door: the how-to is the bring section of docs/features/bring.md this extends, and the terminal door is the new Propose upstream screen Replaces: nothing, Talk had no way to send work on a copy back to where the repository is kept Direction: Talk works with origins, the person's repositories hosted elsewhere, the owner's ask of 11-24 (#10262), ahead of #6534Co-Authored-By: Claude Fable 5 <[email protected]>
--- Part 3 of the origins series (#16370, #16374 landed). The owner, 2026-11-25: "i could use the crew to iterate on my fork then open a PR upstream". One commit.
For the reviewer, since this pushes to and opens pulls on another host: please check that the plan sentence is drawn from the forge, that a stale plan is refused, that the origin's default branch can never move, and the two provider fixes (push rights read from the origin; the forge provider's branch paging).
🤖 Generated with Claude Code