Skip to content

fix(mcp): stop double cost confirmation on create_project and create_branch - #468

Merged
barryroodt merged 5 commits into
mainfrom
barryroodt/fix-double-cost-confirmation
Oct 13, 2026
Merged

barryroodt merged 5 commits into
mainfrom
barryroodt/fix-double-cost-confirmation

Conversation

@barryroodt

@barryroodt barryroodt commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?

This fixes a double cost confirmation on create_project and create_branch, a follow-up to #467. Refs #466, AI-1303.

What is the current behavior?

Since #467, the tool descriptions tell the model the user must agree to the cost first. So form-capable clients like Claude Code ask in chat, then show the server's cost form, and the user confirms twice.

What is the new behavior?

Every client gets the same description: call the tool without confirm_cost_id (unless required) and don't ask about cost in chat. The server then shows its cost form, or returns the steps to get a confirmation ID. It has to be one description because Codex reads OpenAI's cached tool snapshot, which a scanner without forms took, but Codex supports forms at runtime.

A missing ID now returns those steps (get_cost -> confirm_cost -> retry with its confirmation_id as confirm_cost_id) where it used to return the opaque hash-mismatch error. create_project also mentions that a $0 project skips the form. No schema changes.

How to Review

Paths are under packages/mcp-server-supabase/src/.

  1. Shared description and missing-ID message: tools/confirmation.ts
  2. Tool descriptions and missing-ID guard: tools/account-tools.ts, tools/branching-tools.ts
  3. Tests: server.account.test.ts, server.branching.test.ts

Verification

I tested on supabase.green with a local HTTP server from this branch and Claude Code. Creating a project and a branch each showed a single cost form, and the server log shows no get_cost/confirm_cost calls.

Additional context

The scanner-facing text changes, so OpenAI will likely re-review it.

@barryroodt
barryroodt requested a review from a team as a code owner October 13, 2026 10:23
@coveralls

coveralls commented Oct 13, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 38383712908

Coverage decreased (-0.03%) to 96.961%

Details

  • Coverage decreased (-0.03%) from the base build.
  • Patch coverage: 15 of 15 lines across 3 files are fully covered (100%).
  • 4 coverage regressions across 1 file.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

4 previously-covered lines in 1 file lost coverage.

File Lines Losing Coverage Coverage
packages/mcp-server-supabase/src/tools/account-tools.ts 4 98.49%

Coverage Stats

Coverage Status
Relevant Lines: 4478
Covered Lines: 4364
Line Coverage: 97.45%
Relevant Branches: 721
Covered Branches: 677
Branch Coverage: 93.9%
Branches in Coverage %: Yes
Coverage Strength: 88.88 hits per line

💛 - Coveralls

@barryroodt barryroodt self-assigned this Oct 13, 2026

@raulb raulb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@barryroodt Please, let's stop posting PR descriptions generated by AI.

The section "How to review" is clearly written by an LLM since it lists the modified files I can see already myself.

I would like to spend my time reading things that add value and are written by a human.

@barryroodt

Copy link
Copy Markdown
Contributor Author

@barryroodt Please, let's stop posting PR descriptions generated by AI.

The section "How to review" is clearly written by an LLM since it lists the modified files I can see already myself.

I would like to spend my time reading things that add value and are written by a human.

While most of the description has been generated by AI initially, I do read through and edit it before posting.
I personally find the How to Review summary handy, though perhaps in this instance the PR is small enough to not warrant it.

I'm often torn between how much detail to leave in, since I'm aware that some people prefer to run the initial review through an agent first, vs leaving it broad and easier for humans to go through.

That said, thanks for the review and the feedback, appreciated.

@barryroodt
barryroodt merged commit 3c3b1fc into main Oct 13, 2026
5 checks passed
@supabase-releaser supabase-releaser Bot mentioned this pull request Oct 12, 2026

raulb commented Oct 13, 2026

Copy link
Copy Markdown
Member

@barryroodt All good. It's possible that I used the wrong example to voice my frustration, but I only want to make sure we all post content we do believe adds value. Every word / paragraph (here / Slack / anywhere else) counts toward the reader's / reviewer's time, and lately I've been frustrated by everyone's (general) lack of ability to summarize. I admit it's taking a toll on me.

@barryroodt

Copy link
Copy Markdown
Contributor Author

@raulb Totally understandable. On the converse side I'm finding the need to constantly review and summarise and double check everything coming out of these agents frustrating as well.

It's tolling on both ends for sure.

barryroodt pushed a commit that referenced this pull request Oct 14, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>mcp-utils: 0.9.0</summary>

##
[0.9.0](mcp-utils-v0.8.0...mcp-utils-v0.9.0)
(2026-10-14)


### Features

* **mcp-utils:** add bounded request lifecycle observations
([#427](#427))
([b11d62b](b11d62b))
</details>

<details><summary>mcp-server-supabase: 0.14.0</summary>

##
[0.14.0](mcp-server-supabase-v0.13.0...mcp-server-supabase-v0.14.0)
(2026-10-14)


### Features

* **advisors:** add health advisor support
([#420](#420))
([8a26508](8a26508))
* **mcp-server-supabase:** add bounded cost lifecycle observations
([#428](#428))
([657d1f3](657d1f3))
* **mcp-server-supabase:** add destructive SQL observations
([#455](#455))
([4595698](4595698))


### Bug Fixes

* **mcp:** clarify cost and deploy tool descriptions for OpenAI scanner
([#467](#467))
([1f9da03](1f9da03))
* **mcp:** stop double cost confirmation on create_project and
create_branch ([#468](#468))
([3c3b1fc](3c3b1fc))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: supabase-releaser[bot] <223506987+supabase-releaser[bot]@users.noreply.github.com>
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.

3 participants