Skip to content

Autonomous development for real products. Governed agents build from specs you approve, follow the rules you set, and nothing merges until another agent proves it. Your decisions, judgement and taste are the bar that work must clear. Declare your vision and let agents build it.

fix(presence): retain installed session hook resolution [I6]

Corey Olson807c3aa14cdd
diff --git a/src/init.js b/src/init.js
index e462bedc..4236cfcb 100644
--- a/src/init.js
+++ b/src/init.js
@@ -713,10 +713,10 @@ function writeSessionHook(root, onWrite) {
}
settings.hooks = { ...settings.hooks };
let changed = false;
- for (const [event, command] of [['SessionStart', RESUME_HOOK], ['Stop', 'pullboard heartbeat'], ['SessionEnd', 'pullboard heartbeat']]) {
+ for (const [event, command] of [['SessionStart', RESUME_HOOK], ['Stop', RESUME_HOOK.replaceAll(' resume', ' heartbeat')], ['SessionEnd', RESUME_HOOK.replaceAll(' resume', ' heartbeat')]]) {
const hooks = settings.hooks[event] ?? [];
if (!Array.isArray(hooks)) continue;
- if (!JSON.stringify(hooks).includes(command)) {
+ if (!JSON.stringify(hooks).includes(event === 'SessionStart' ? 'pullboard resume' : 'pullboard heartbeat')) {
settings.hooks[event] = [...hooks, { hooks: [{ type: 'command', command, timeout: 30 }] }];
changed = true;
}