Conversation
…ty and trust approval process
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 90e2bcb. Configure here.
| } | ||
| std::thread::sleep(Duration::from_millis(50)); | ||
| } | ||
| } |
There was a problem hiding this comment.
No early exit when spawned watcher process dies
Medium Severity
wait_for_background_start only checks process_running(pid) as part of the success condition (alongside STATE_RUNNING). If the spawned child process crashes before writing STATE_RUNNING, the process is dead but the function never detects this — it loops for the full 10-second BACKGROUND_START_TIMEOUT before returning an error. Since this is called during init and start, a watcher that crashes on launch causes those commands to hang for 10 seconds with no feedback.
Reviewed by Cursor Bugbot for commit 90e2bcb. Configure here.


…ty and trust approval process
Note
Medium Risk
Changes default init/start side effects (background process lifecycle) and watcher startup timing; failures could block or confuse setup until timeout or env opt-out.
Overview
Init and
agentmesh startnow start a persistent background watcher after hook installation (unless hooks are skipped orAGENTMESH_DISABLE_WATCHER_AUTOSTARTis set), with dry-run/plan output and init dry-run reflecting Start watcher.The watcher waits up to 10s for a background child to reach running, puts Unix spawns in a new process group, and lets a foreground child take over when the state file is background-spawned with the same PID.
Docs and CLI copy clarify that
startenables immediate sync on direct edits toAGENTS.md,CLAUDE.md, and.ai/, and expand Codex one-time hook trust steps plus fallback sync paths (watcher, Claude hooks, manualagentmesh sync).Tests disable watcher autostart on Windows, stop watchers after noisy flows, and assert
startleaves the watcher running on Unix.Reviewed by Cursor Bugbot for commit bc21b37. Bugbot is set up for automated code reviews on this repo. Configure here.