From c7a8a4339cd3cd8d90846972dd62b3c0be703ba4 Mon Sep 17 00:00:00 2001 From: Codex Date: Sat, 19 Sep 2026 20:35:09 +0900 Subject: [PATCH] fix: let tribunal rooms self-heal a missing work_dir instead of going silent preparePairedExecutionContext bailed out early when group.workDir was null, which made the ensurePairedProject() self-heal directly below it unreachable. A tribunal room registered without work_dir therefore produced no paired execution context at all: the turn output was never persisted, the task revision stayed frozen and the 10-minute execution lease was never released, so every follow-up human message inside that window was silently dropped and the room appeared to stop answering. Single-mode rooms still bail out via ensureActiveTask returning null. Co-Authored-By: Claude Opus 4.7 --- src/paired-execution-context.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/paired-execution-context.ts b/src/paired-execution-context.ts index 6554726..3c201ad 100644 --- a/src/paired-execution-context.ts +++ b/src/paired-execution-context.ts @@ -484,7 +484,15 @@ export function preparePairedExecutionContext(args: { pairedTurnIdentity?: PairedTurnIdentity; }): PreparedPairedExecutionContext | undefined { const { group, chatJid, roomRoleContext } = args; - if (!roomRoleContext || !group.workDir) { + // Do NOT bail out on a null group.workDir here: ensurePairedProject() below + // self-heals that case for tribunal rooms by provisioning the canonical + // workspace on demand. Returning early made that self-heal unreachable, so a + // tribunal room registered without work_dir produced no paired context at + // all — the turn output was never persisted, the task revision stayed frozen + // and the 10-minute execution lease was never released, which silently + // dropped every follow-up human message inside that window. Single-mode + // rooms still bail out via ensureActiveTask returning null. + if (!roomRoleContext) { return undefined; }