gitbutlerapp/gitbutler · error

{}{} is not open and cannot be marked ready

Error message

{}{} is not open and cannot be marked ready

What it means

prepare_mark_review_ready (crates/but/src/command/mcp/mod.rs:791) loads the review from the forge and requires review.is_open(); merged or closed reviews cannot be marked ready, and the message includes the unit symbol plus number (e.g. !123 or #42). Open but non-draft reviews are fine — that path returns the view as AlreadyReady instead of erroring.

Source

Thrown at crates/but/src/command/mcp/mod.rs:791

    review_view(&request.repository, &[request.review_number])
}

enum MarkReadyPreparation {
    AlreadyReady(ReviewView),
    Update {
        preferred_user: Option<but_forge::ForgeUser>,
        repository: but_forge::ForgeRepoInfo,
        storage: but_forge_storage::Controller,
    },
}

fn prepare_mark_review_ready(request: &MarkReviewReadyRequest) -> Result<MarkReadyPreparation> {
    let resolved = open_repository(&request.repository)?;
    let forge = ForgeRepository::from_context(&resolved.ctx)?;
    let review = forge.get_review(&resolved.ctx, request.review_number)?;
    if !review.is_open() {
        bail!(
            "{}{} is not open and cannot be marked ready",
            review.unit_symbol,
            review.number
        );
    }
    if !review.draft {
        return review_view_from_repository(resolved, &[request.review_number])
            .map(MarkReadyPreparation::AlreadyReady);
    }
    if !forge.display.capabilities.pr_service {
        bail!(
            "Marking reviews ready is not supported for {:?}",
            forge.display.name
        );
    }

    let ForgeRepository {
        preferred_user,

View on GitHub (pinned to caf1f223d3)

Solutions

  1. Check the review state first with the review-view tool; only open draft reviews can be marked ready.
  2. If the review should still be open, reopen it on the forge and retry.
  3. If the review is already ready (not a draft), no action is needed — that case returns normally.

Example fix

// before
{ "review_number": 123 }  // !123 was merged yesterday

// after: verify first
{ "review_numbers": [123] }  // review-view shows state: open, draft
{ "review_number": 123 }    // now mark ready succeeds
Defensive patterns

Strategy: validation

Validate before calling

let review = forge.get_review(&resolved.ctx, request.review_number)?;
if !review.is_open() {
    anyhow::bail!("review {} is {} — only open reviews can be marked ready", review.number, review.state);
}

Try / catch

match prepare_mark_review_ready(&request) {
    Err(err) if err.to_string().contains("is not open") => {
        // re-fetch the review view and show its current state instead of retrying
    }
    other => other,
}

Prevention

When it happens

Trigger: Calling mark-review-ready on a review that is already merged or closed on the forge.

Common situations: Stale review numbers captured before a merge; retrying an old tool call after the PR merged; confusing issue numbers with PR numbers.

Related errors


AI-assisted analysis of gitbutlerapp/gitbutler@caf1f223d3 (2026-08-20). Data as JSON: /api/errors/21e543bc2ab4e1c9. Report an issue: GitHub.