Runtime or CLI code links a write operation to an explicit external AI-agent control path:
.update(`${e.projectroot}\0${n.sessionid??""}\0${n.tooluseid??""}\0${e.requesttype}\0${o}`).digest("hex").slice(0,24)}`,projectroot:e.projectroot,sessionid:n.sessionid,tooluseid:n.tooluseid,requesttype:e.requesttype,tool:t,reason:e.reason??"unknown",durationms:e.durationms,attempts:e.attempts,createdat:o});}finally{r.close();}}catch{}try{let r=join(getdevflowstateroot(),"logs","hook-fallback",`${new date(o).toisostring().slice(0,10)}.log`);mkdirsync(dirname(r),{recursive:!0,mode:448}),appendfilesync(r,`${json.stringify({ts:o,tool:t,requesttype:e.requesttype,projectroot:e.projectroot,reason:`daemon-${e.reason??"unknown"}`,durationms:e.durationms,attempts:e.attempts,bypasscountlost:!0,disabledfeatures: