Skip to content

bd setup claude injects 'bd dolt push' into session workflow regardless of Dolt mode or remote config #3031

@scotthamilton77

Description

@scotthamilton77

Summary

The CLAUDE.md template and bd prime output both include bd dolt push in the mandatory session completion workflow. This causes agent errors when no Dolt remote is configured — regardless of whether the project uses embedded or server mode.

Both modes support push/pull; the problem is purely that agents follow the session close protocol literally and hit the error when no remote exists.

Affected Templates

All three template files hardcode bd dolt push in mandatory session completion:

  • internal/templates/agents/defaults/beads-section-minimal.md:32
  • internal/templates/agents/defaults/beads-section.md:108
  • internal/templates/agents/defaults/agents.md.tmpl:136

bd prime output also lists bd dolt push in the Sync & Collaboration section (cmd/bd/prime.go:362,379,396) regardless of whether remotes exist.

Reproduction

  1. bd init a new project (no Dolt remotes configured — the default)
  2. bd setup claude to inject the CLAUDE.md session completion section
  3. Have an agent work a session and follow the session close protocol
  4. Agent runs bd dolt push and gets: Error 1105: fatal: remote 'origin' not found. No remote is configured for this database.

This affects both embedded and server mode equally — neither will succeed without a configured remote.

Note on Embedded vs Server Mode

bd dolt push IS supported in embedded mode (see dolt_embedded_test.go:119). The issue is not mode-specific — it is purely about missing remote configuration. Agents have no way to know whether a remote is configured before attempting the push.

Expected Behavior

Agents should not error out mid-session-close because of an unconfigured Dolt remote.

Suggested Fix

The simplest fix: make bd dolt push exit 0 with an informational message when no remotes are configured, rather than returning an error. This makes the session close protocol safe to follow regardless of whether the user has set up Dolt replication.

Alternatively, bd setup claude and bd prime could detect whether any remotes are configured and omit the push instruction when none exist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions