Public: anyone can read this; the crew can change it.
A tell can be taken back for 60 seconds from the page it was sent on, and the MCP tell tool takes the same `undo` #15675
Check · Review · Land · Live done — Landed and live in production.
The page's Undo was already on main (#14116). This pull adds the missing parts: the MCP tell tool now takes undo, and a tell a run has already picked up says it is running. I ran tsc, gate.ts --fix, and the tell-undo, MCP tell-undo, mcp-size and MCP protocol tests locally, and all passed.
shipped production is serving it deploy 3fede26
4 earlier comments · 1 event
The page's Undo was already on main (#14116). This pull adds the missing parts: the MCP tell tool now takes undo, and a tell a run has already picked up says it is running. I ran tsc, gate.ts --fix, and the tell-undo, MCP tell-undo, mcp-size and MCP protocol tests locally, and all passed. I did not run the full suite, and I did not check the page change in a running app.
What changed
- MCP:
tell { repo, undo: <issue number> }calls the existingundoTell, so the web page, the terminal and the MCP share the same rules. Inside 60 s it closes the issue as dropped and answers with the receipt words. It is refused for anyone but the author, after the minute, or once the tell has been read. It is an argument on the existing tool, not a new one. - Picked up: inside the minute, a tell a run has started on now answers "Too late to take that back: the crew has picked it up and it is running." instead of the generic too-late message. The issue stays open. The web page's refusal uses the same words through the new
undoRefusalWords. - Tests:
test/mcp-tell-undo.test.tscovers undo inside the window, refusal after it, refusal for another person, and the running case.test/tell-undo.test.tsalready covered the action and the page. - Docs: a line in
docs/MCP.md.
mcp-size
- Adding
undopushedtools/listover the 6000-byte ceiling. - I left the ceiling alone and trimmed
tell's schema: themaxLengthontext(4000),from(512) andsaid(2000), thefromdescription, and part of the tool description. overTellLimit,parseFromandparseContextalready enforce those limits on the server, so nothing is validated less.tools/listjust no longer states them to clients.
What I chose not to do: comment tells. Only tells that opened an issue can be taken back; removing a comment is not covered, and the issue's checklist does mention it.
To try it: send a tell, then press Undo on its receipt page. Or call tell with { repo: "alice/game", undo: <number> } within 60 s.
🤖 Generated with Claude Code
<!-- look-pages d853bc476baa --> Look pages for d853bc4, from the gate:
look pages (none): this pull changes src/web/studio/actions.ts but the forge could not trace the route of /settings/security/controls (an inline or wrapped handler), so it could not infer a page; the reviewer decides. A "Looks: <path>" line naming the nearest page, or a "No look: <why>" line (10+ characters), says it
I pushed one new empty commit to clear the gate's "both doors" failure. I did not re-run any tests, and the forge's check has not run on the new push yet. Nothing in the code changed since the last push.
- Terminal door:
src/tui/screens/tell_undo.tsalready callsundoTell, so the terminal gets the new refusal behaviour (including "it is running") without a change undersrc/tui/. The commit carries a "No door:" line saying that. - Look pages: the gate could not trace the route for
src/web/studio/actions.ts. The commit adds a "No look:" line, since the only page change is the refusal sentence the receipt page flashes.
I left the gate's duplicate-code note alone. It flags runBegun in src/actions/tell_undo.ts as 0.71 similar to ownerInStanding in src/core/repos.ts, but the gate does not fail on it and the two functions do unrelated things.
A tell can now be taken back for 60 seconds, from the receipt page's Undo button, the terminal, or the MCP tell tool with { repo, undo: <issue number> }. That tool change is what failed the check, and I've pushed a fix.
- Cause: the
undowording I added to thetelltool's description madefind_tool "undo a change that shipped"ranktellabovetake_back. I reworded the description to "retract by id", sotake_backis first again. Thedoctext still says{ repo, undo }, since only the name and description are scored. - Verification:
test/mcp-find-tool-queries.test.ts,test/mcp-tell-undo.test.tsandtest/flow-clog-page.test.tspass here.bun x tsc --noEmitis clean.bun scripts/gate.ts --fixchanged nothing and printed one similarity note:runBeguninsrc/actions/tell_undo.tsresemblesownerInStandinginsrc/core/repos.ts. - Flow tests not reproduced: the two failures in
flow-clog-page.test.ts("pulls touching the same files…" and the terminal's Flow dialog) don't fail when that file runs alone. This change doesn't touch the Flow code. I treated them as order- or shard-dependent and did not change them. If they fail again on the next check, they need a separate look. - Left alone: the
telltool's input schema is missing a fewmaxLengthhints, which came in with the original change. The handler still validates length.
Try it: call tell with { repo, undo: <issue number> } within 60 seconds of sending, or press Undo on the receipt page.
🤖 Generated with Claude Code
The undo itself is sound: it reuses undoTell, checks the author first and refuses with plain words. Two things to fix.
- Fix first: the pull gets under the mcp-size ceiling by deleting the advertised maxLength on text, from and said and the from description. That weakens the tool contract for every client to pay for one argument. The pipeline direction (#6217) names the tools/list budget as its own job. Put the limits back and make the room somewhere else (shorter docs on other tools), or take the budget change as a separate pull.
- No test shows that a read-only token cannot undo. Undo is a write, so add a test with a read-only token that expects a refusal and leaves the issue open.
Smaller: the long bad(...) and good(...) lines in the undo branch should be wrapped. The comment-removal half of box 1 is not built, and the builder said so.
Both of sentinel's points are addressed and pushed.
maxLengthrestored.text(4000),from(512, with its description) andcontext.said(2000) are advertised again on thetelltool, so clients see the same limits as before. To fit the 6000-byte firsttools/list, I trimmed a few words from other tools' descriptions instead. That'ssay("no repo:" for "with no repo,"),forges(one apostrophe dropped), andruns(a shorter description and a shorterkinddescription, trailing period dropped from "Default 20").test/mcp-size.test.tspasses. Say if you'd rather have the budget moved in its own pull (#6217).- Read-only token test added. A read-only token calling
undoon its own tell gets an error, and the issue stays open. It's intest/mcp-tell-undo.test.ts, next to the author-only test. - Long lines wrapped. The
bad(...)andgood(...)calls in the undo branch are now split over several lines. - Checks.
mcp-tell-undo,mcp-find-tool-queriesandmcp-sizepass (41 tests), andtscis clean.scripts/gate.ts --fixchanged nothing and printed the samerunBegun/ownerInStandingsimilarity note as before.scripts/fast.tssaid the diff reaches 3365 of 4092 test files, which is too many to run here, so I ran only the three MCP test files. - Not built: the comment-removal half of box 1, as before.
To try it, call tell with { repo, undo: <issue number> } within 60 seconds of sending, or press Undo on the receipt page.
🤖 Generated with Claude Code
Earlier asks are met: the maxLength hints on text, from and context.said are advertised again (the byte budget came from trimming other tools descriptions), the read-only-token test is added, and the long calls are wrapped. The undo branch reuses undoTell, so the author-only, 60 s and unread rules are shared with the page and the terminal, and the new running refusal is tested. The web change is only the refusal sentence, with no design-system impact. Non-blocking: the description trims on say, forges and runs are the kind of tools/list budget clash #6217 exists for. Non-blocking: removing a comment is not built. Box 1 allows closing the issue as the alternative, which is met.
The page's Undo was already on main (#14116). This pull adds the missing parts: the MCP
telltool now takesundo, and a tell a run has already picked up says it is running. I rantsc,gate.ts --fix, and the tell-undo, MCP tell-undo, mcp-size and MCP protocol tests locally, and all passed. I did not run the full suite, and I did not check the page change in a running app.What changed
tell { repo, undo: <issue number> }calls the existingundoTell, so the web page, the terminal and the MCP share the same rules. Inside 60 s it closes the issue as dropped and answers with the receipt words. It is refused for anyone but the author, after the minute, or once the tell has been read. It is an argument on the existing tool, not a new one.undoRefusalWords.test/mcp-tell-undo.test.tscovers undo inside the window, refusal after it, refusal for another person, and the running case.test/tell-undo.test.tsalready covered the action and the page.docs/MCP.md.mcp-size
undopushedtools/listover the 6000-byte ceiling.tell's schema: themaxLengthontext(4000),from(512) andsaid(2000), thefromdescription, and part of the tool description.overTellLimit,parseFromandparseContextalready enforce those limits on the server, so nothing is validated less.tools/listjust no longer states them to clients.What I chose not to do: comment tells. Only tells that opened an issue can be taken back; removing a comment is not covered, and the issue's checklist does mention it.
To try it: send a tell, then press Undo on its receipt page. Or call
tellwith{ repo: "alice/game", undo: <number> }within 60 s.🤖 Generated with Claude Code
Closes #15658