gastownhall/beads · warning

remote adoption declined; nothing was written and nothing…

Error message

remote adoption declined; nothing was written and nothing was pushed

What it means

This error is returned when the user explicitly declines the interactive prompt to adopt the git-origin-derived Dolt remote. Nothing was written or pushed, so it is a clean abort rather than a fault — but it is surfaced as an error so callers stop the push flow. The message reassures that no state changed.

Solutions

  1. If declining was intentional, configure the remote explicitly with bd dolt remote add origin <url> and retry
  2. If declining was accidental, re-run the push and answer yes at the adoption prompt, or use --yes
  3. Suppress the prompt entirely for scripts by passing --yes or setting BD_NO_REMOTE_ADOPT=1 with a pre-configured remote

Example fix

// before
bd push  # prompt: adopt origin? -> no
// after
bd push  # answer yes, or: bd push --yes
Defensive patterns

Strategy: try-catch

Validate before calling

if !interactive() && optIn == adoptAsk {
    return errors.New("cannot prompt for remote adoption in non-interactive mode; pass --yes or configure a remote")
}

Try / catch

ok, err := applyAdoptionConsent(...)
if err != nil && strings.Contains(err.Error(), "remote adoption declined") {
    // clean abort: no state changed; prompt user again or exit gracefully
}

Prevention

When it happens

Trigger: applyAdoptionConsent with optIn == adoptAsk (e.g. --yes not passed, interactive TTY present), confirmRemoteAdoption prompts, and the user answers no.

Common situations: User accidentally triggered push, hesitates at the consent prompt, and declines; automation wrapping an interactive session that feeds a non-affirmative answer to the prompt.

Related errors


AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30). Data as JSON: /api/errors/6b1be1a62465a89c. Report an issue: GitHub.

Appendix: source

Thrown at cmd/bd/dolt_remote_adopt.go:155

// applyAdoptionConsent is the gate as the push path uses it: given a derived
// URL and a policy, either return proceed=true (everything after this may
// write) or stop. It is separated from adoptGitOriginRemoteForPush so the
// fail-closed behavior can be asserted without resolving a workspace — that
// resolution mutates whatever repo the test binary runs in, which is exactly
// what the syncAdoptGitOrigin seam comment in sync.go warns about.
//
// proceed=false with err=nil is the deliberate --no-adopt case: the caller
// falls through to its ordinary no-remote handling rather than failing.
func applyAdoptionConsent(remoteURL string, policy adoptPolicy, optIn adoptOptIn) (bool, error) {
	switch decision, refusal := decideRemoteAdoption(policy); decision {
	case adoptRefuse:
		if refusal == adoptRefusedNonInteractive {
			return false, adoptionRefusedError(remoteURL, optIn)
		}
		return false, nil
	case adoptAsk:
		if !confirmRemoteAdoption(remoteURL, optIn) {
			return false, fmt.Errorf("remote adoption declined; nothing was written and nothing was pushed")
		}
		return true, nil
	default: // adoptProceed
		// --yes: consent given ahead of time. Still announce the target, so a
		// scripted run leaves a record of where it uploaded.
		fmt.Fprintf(os.Stderr, "Adopting Dolt remote origin from git origin: %s\n", remoteURL)
		return true, nil
	}
}

// confirmRemoteAdoption asks, showing the URL and every side effect that
// follows a yes. The config.yaml commit is named here because it is made under
// the user's git identity in their repo, which is a surprise worth disclosing
// before the fact rather than in a line printed after it happened (#5068
// acceptance item 4).
func confirmRemoteAdoption(remoteURL string, optIn adoptOptIn) bool {
	fmt.Fprintln(os.Stderr, "")
	fmt.Fprintln(os.Stderr, "No Dolt remote is configured for this rig.")

View on GitHub (pinned to 71377f2769)