You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(hook): notify agent when no VCS detected on plan approval
When a plan is approved in a directory without version control,
include a message in the approval output so the agent can ask
the user to initialize git before making changes.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@@ -820,10 +820,19 @@ if (args[0] === "sessions") {
820
820
// Cleanup
821
821
server.stop();
822
822
823
+
// Check if working directory has version control (git or p4)
824
+
constnoVcsMessage=await(async()=>{
825
+
if(!result.approved)return"";
826
+
constprovider=awaitdetectVcs();
827
+
if(awaitprovider.detect())return"";
828
+
return"\n\n[Note: No version control detected in this directory. Before making changes, ask the user if they want to initialize git to enable change tracking.]";
829
+
})();
830
+
823
831
// Output decision in the appropriate format for the harness
0 commit comments