Global daemon support has been deprecated for most of the project's
lifetime. This change removes the dead code entirely:
- Remove --global and --migrate-to-global daemon flags
- Remove runGlobalDaemon() and migrateToGlobalDaemon() functions
- Remove shouldUseGlobalDaemon() and getGlobalBeadsDir() functions
- Simplify functions that had global bool parameters
- Remove warning about old global socket in getSocketPath()
This reduces code complexity and removes 238 net lines of unused code.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Currently 'bd daemon' with no args immediately starts the daemon. This is
inconsistent with other daemon management commands like --stop, --status,
etc. and makes the command less discoverable for new users.
Changes:
- Add --start flag to explicitly start daemon
- Show help text when no operation flags provided
- Update auto-start logic to use --start flag
- Update startDaemon() to pass --start when forking
- Update all documentation to use 'bd daemon --start'
- Update MCP Python client error messages
The MCP docs already incorrectly showed 'bd daemon start' which doesn't
work, so this change fixes that documentation bug while improving UX.
Auto-start still works correctly - it now passes --start internally.
Fixes bd-gfu
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add BD_RPC_DEBUG=1 for lightweight timing logs to stderr
- Log socket path, socket exists check, dial timing, health check timing
- Improve daemon status message when lock not held
- Helps field triage of connection issues without verbose daemon logs
- Fixes bd-j7e2
Improvements:
1. Added top-level panic recovery in runDaemonLoop
- Captures stack trace and logs to daemon.log
- Writes daemon-error file with crash details for user visibility
- Cleans up PID file on panic
2. Replaced os.Exit calls with return statements where possible
- Allows deferred cleanup to run (lock release, socket removal, etc)
- Improves graceful shutdown on errors
3. Enhanced stopDaemon forced-kill path
- Removes stale socket file after process.Kill()
- Prevents socket artifacts from accumulating
4. Added integration tests for crash recovery
Closes bd-vcg5