#2778·cli

base: --dry-run skips the --yes confirmation gate on high-risk deletes

Author: anhtahayloveCreated Sep 24, 2026Updated Sep 24, 2026
Labelsbugdomain/basedomain/core

What happens

--dry-run does not evaluate the --yes confirmation gate. A high-risk delete that real execution refuses is printed by dry-run as a ready DELETE request, with no indication that the confirmation flag is missing.

Verified with @larksuite/cli 1.0.96:

bash
$ lark-cli base +table-delete --base-token <token> --table-id tblX --as user
{
  "ok": false,
  "error": {
    "type": "confirmation",
    "subtype": "confirmation_required",
    "message": "base +table-delete requires confirmation",
    "hint": "add --yes to confirm",
    "risk": "high-risk-write"
  }
}

$ lark-cli base +table-delete --base-token <token> --table-id tblX --dry-run
{
  "ok": true,
  "dry_run": true,
  "data": { "api": [ { "method": "DELETE", "url": "/open-apis/base/v3/bases/<token>/tables/tblX" } ] }
}

+base-block-delete --block-id blk1 behaves identically: blocked on real execution, emitted as a DELETE under --dry-run.

This is specific to the confirmation gate, not a general "dry-run skips validation" rule — other flag checks still run:

bash
$ lark-cli base +table-delete --base-token <token> --dry-run
{ "ok": false, "error": { "message": "required flag(s) \"table-id\" not set" } }

Why it matters

skills/lark-base/SKILL.md tells agents to use --yes after confirming the target and impact, and --dry-run is the natural way for an agent to self-check a destructive command before running it. Because the gate is skipped, that check always passes, so dry-run reports a clean plan for a command that will be refused — or, once --yes is added on the strength of that clean plan, will delete a table.

The mismatch is the problem: dry-run is meant to preview what real execution would do, and here the two disagree precisely on the safety gate.

Expected

--dry-run should apply the same confirmation gate as real execution and fail with confirmation_required when --yes is absent, so the preview reflects what would actually happen.

If the current behavior is intentional — dry-run as "show me the request shape, gates are an execution concern" — then documenting it would be enough, and I am happy to send that as a docs change instead.

Environment

  • @larksuite/cli 1.0.96 (npm), Windows
  • Commands: base +table-delete, base +base-block-delete