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>
@@ -967,10 +967,19 @@ if (args[0] === "sessions") {
967
967
// Cleanup
968
968
server.stop();
969
969
970
+
// Check if working directory has version control (git or p4)
971
+
constnoVcsMessage=await(async()=>{
972
+
if(!result.approved)return"";
973
+
constprovider=awaitdetectVcs();
974
+
if(awaitprovider.detect())return"";
975
+
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.]";
976
+
})();
977
+
970
978
// Output decision in the appropriate format for the harness
0 commit comments