{"version":272,"agent":"box-grants","message":"abso-hooks mod: ask for news every 5 minutes, not 30 seconds, and not at all in a chat with no tool call for 10 minutes (its next tool call starts it again). Prod abso's object reset under the load of every chat asking every 30 seconds (Agent VCS, 5:10 PM CT). abso announce says so. Tests: node client/test-mods.ts.","time":1792102064140,"timeIso":"2026-10-15T22:07:44.140Z","changes":3,"change":4115,"files":["client/hooks/register.test.ts","client/hooks/register.ts","client/src/announce.ts"],"draft":null,"diff":[{"path":"client/hooks/register.test.ts","added":23,"removed":7,"diff":"--- a/client/hooks/register.test.ts\n+++ b/client/hooks/register.test.ts\n@@ -40,15 +40,17 @@\n \t\tappended.push((e.message.content as { text: string }[])[0]!.text);\n \t\treturn next(e);\n \t});\n+\t// Tools the chat calls run as asked.\n+\ton(\"tool.call\", () => ({ result: { isError: false, text: \"ok\" } }) as never);\n \treturn { clock, asked, auth, clients, appended, written };\n }\n \n-test(\"the news poll asks every 30 seconds in an abso folder, and keeps each item once\", async ($, on) => {\n+test(\"the news poll asks every 5 minutes in an abso folder, and keeps each item once\", async ($, on) => {\n \t// The kit has no conversation to append to, so the append itself is checked in a live session (#25);\n \t// here: the poll's timing, the call, and the news log the view mod reads.\n \tconst w = world(on, true, [[\"Announcement from lead: stop pushing until v12 lands\"], []]);\n \tawait $.session.start({ cwd: \"/w/p\" });\n-\tawait w.clock.advance(29_000);\n+\tawait w.clock.advance(299_000);\n \texpect(w.asked).toEqual([]);\n \tawait w.clock.advance(1_000);\n \texpect(w.asked).toEqual([\"https://avcs.test/p/p/a/bob/news\"]);\n@@ -56,7 +58,8 @@\n \texpect(w.auth[0]).toBe(\"none\");\n \t// Which mod asked: avcs-mod/<version> once installed, avcs-mod/checkout from a checkout (#29).\n \texpect(w.clients[0]).toMatch(/^avcs-mod\\/(checkout|\\d+\\.\\d+\\.\\d+(\\+[\\w.]+)?)$/);\n-\tawait w.clock.advance(30_000);\n+\tawait $.tool.call({ tool: \"Bash\", command: \"ls\" } as never);\n+\tawait w.clock.advance(300_000);\n \texpect(w.asked).toHaveLength(2);\n \tconst log = w.written.get(\"/w/p/.abso/news.log\") ?? \"\";\n \texpect(log.split(\"\\n\").filter((l) => l.includes(\"Announcement from lead\"))).toHaveLength(1);\n@@ -64,14 +67,28 @@\n \n test(\"while the seat holds its news stream (abso 690), the poll stands down, and asks again once the mark runs out\", async ($, on) => {\n \tconst w = world(on, true, [[], []]);\n-\tw.written.set(\"/w/p/.abso/news-stream.json\", JSON.stringify({ until: 1_000_000 + 95_000 }));\n+\tw.written.set(\"/w/p/.abso/news-stream.json\", JSON.stringify({ until: 1_000_000 + 400_000 }));\n \tawait $.session.start({ cwd: \"/w/p\" });\n-\tawait w.clock.advance(90_000);\n+\tawait w.clock.advance(300_000);\n \texpect(w.asked).toEqual([]);\n-\tawait w.clock.advance(30_000);\n+\tawait $.tool.call({ tool: \"Bash\", command: \"ls\" } as never);\n+\tawait w.clock.advance(300_000);\n \texpect(w.asked).toEqual([\"https://avcs.test/p/p/a/bob/news\"]);\n });\n \n+test(\"a chat with no tool call for 10 minutes stops asking for news; its next tool call starts it again\", async ($, on) => {\n+\tconst w = world(on, true, [[], [], []]);\n+\tawait $.session.start({ cwd: \"/w/p\" });\n+\tawait w.clock.advance(300_000);\n+\texpect(w.asked).toHaveLength(1);\n+\t// Idle since the start: at 10 and 15 minutes it doesn't ask.\n+\tawait w.clock.advance(600_000);\n+\texpect(w.asked).toHaveLength(1);\n+\tawait $.tool.call({ tool: \"Read\", file_path: \"/w/p/a.ts\" } as never);\n+\tawait w.clock.advance(300_000);\n+\texpect(w.asked).toHaveLength(2);\n+});\n+\n test(\"outside an abso folder it never asks\", async ($, on) => {\n \tconst w = world(on, false, [[\"should not arrive\"]]);\n \tawait $.session.start({ cwd: \"/w/p\" });\n@@ -85,7 +102,6 @@\n \tw.written.set(\"/w/p/.abso/known/fuzz.ts\", \"one\\ntwo\\nthree\\n\");\n \tw.written.set(\"/w/p/fuzz.ts\", \"one\\ntwo\\nth\\u0000ree\\n\");\n \ton(\"fs.stat\", () => ({ value: { realPath: \"/w/p/fuzz.ts\" } }) as never);\n-\ton(\"tool.call\", () => ({ result: { isError: false, text: \"ok\" } }) as never);\n \ton(\"session.id\", () => ({ value: \"sess\" }));\n \tawait $.session.start({ cwd: \"/w/p\" });\n \tawait $.tool.call({"},{"path":"client/hooks/register.ts","added":17,"removed":3,"diff":"--- a/client/hooks/register.ts\n+++ b/client/hooks/register.ts\n@@ -89,8 +89,15 @@\n let draining = false;\n const TICK_MS = 150;\n const roots = new Map<string, { root: string | undefined; at: number }>();\n-/** How often to ask for news without an edit (announcements reach an agent that isn't editing). */\n-const NEWS_POLL_MS = 30_000;\n+/**\n+ * How often to ask for news without an edit (announcements reach an agent that isn't editing). Every 5 minutes, and\n+ * not at all in a chat that has made no tool call for IDLE_MS: prod abso's object reset under the load of every chat\n+ * asking every 30 seconds (2026-10-15). abso news --stream (abso 690) wakes a chat without asking.\n+ */\n+const NEWS_POLL_MS = 5 * 60_000;\n+const IDLE_MS = 10 * 60_000;\n+/** When this chat last made a tool call (or started). */\n+let activeAt = 0;\n /** The abso folder this chat works in: the session's folder, or the first edited file's. */\n let newsRoot: string | undefined;\n let polling = false;\n@@ -108,8 +115,10 @@\n \t\t});\n \t\t// Outside an abso folder each tick only reads a variable.\n \t\tnewsRoot = await findRoot($, `${slash(await $.session.cwd())}/.`).catch(() => undefined);\n-\t\t$.clock.every(NEWS_POLL_MS, () => {\n+\t\tactiveAt = await $.clock.now();\n+\t\t$.clock.every(NEWS_POLL_MS, async () => {\n \t\t\tif (polling || newsRoot === undefined) return;\n+\t\t\tif ((await $.clock.now()) - activeAt >= IDLE_MS) return;\n \t\t\tpolling = true;\n \t\t\tvoid pollNews($, newsRoot).finally(() => {\n \t\t\t\tpolling = false;\n@@ -118,6 +127,11 @@\n \t\treturn next(e);\n \t});\n \n+\ton(\"tool.call\", async ($, e, next) => {\n+\t\tactiveAt = await $.clock.now();\n+\t\treturn next(e);\n+\t});\n+\n \ton(\"tool.call\", { tool: TOOLS }, async ($, e, next) => {\n \t\tconst ran = await next(e);\n \t\ttry {"},{"path":"client/src/announce.ts","added":1,"removed":1,"diff":"--- a/client/src/announce.ts\n+++ b/client/src/announce.ts\n@@ -28,7 +28,7 @@\n \tconst answer = await api.announce(text, to);\n \tconst who = answer.to.length === 0 ? \"nobody (no other agents yet)\" : answer.to.join(\", \");\n \treturn {\n-\t\ttext: `Announced to ${who}. Each gets it once, as news on their next edit, or within about 30 seconds where the abso mod runs.`,\n+\t\ttext: `Announced to ${who}. Each gets it once, as news on their next edit, within about 5 minutes in a working chat where the abso mod runs, or at once where it holds its news stream.`,\n \t\tjson: { id: answer.id, to: answer.to },\n \t};\n }"}],"ci":null}