Skip to content

Conversation

@ChrisPenner
Copy link
Member

Overview

  • Allows agents to call "update" via the MCP server
  • This requires the user to explicitly mark a branch as editable by the mcp by passing the --mcp-editable-branches=<project/branch regex> flag in their MCP config. We can continue to explore other options for this.
  • I haven't yet had time to fully explore how this flow works in cases where update requires user interaction; I'd love to hear reports from dogfooding before we merge.

Implementation notes

  • Adds the new global --mcp-editable-branches=<project/branch regex> flag
  • Adds a new update tool
    • accepts literal code or a filepath to a scratch file.
  • Updates the error handling for the CLI to MCP runner so we can short-circuit if code doesn't typecheck.

Test coverage

Added an API transcript test
Could use some dogfooding and testing in the wile before merging/releasing

Loose ends

May want to explore other methods of allowing mcp edits on certain branches, editing your config file and restarting your agent every time is a pain.

@ChrisPenner ChrisPenner marked this pull request as draft October 20, 2025 22:23
@ChrisPenner ChrisPenner marked this pull request as ready for review October 21, 2025 03:10
@aryairani
Copy link
Contributor

Let's do the thing where we mark it as destructive but otherwise don't block.
And maybe later we do the thing where you manually whitelist branches with ucm commands.
As long as we don't have delete brach we should be okay with undo and change comments, though the agent can also just delete files from the disk if you let it...

@ChrisPenner
Copy link
Member Author

Even if it did delete a branch I think you could still get it back with the global reflog, but obviously not ideal.

Okay sounds like a plan 👍🏼

@ChrisPenner
Copy link
Member Author

@aryairani Okay I removed the branch-protection stuff.

@ChrisPenner ChrisPenner requested a review from aryairani October 24, 2025 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants