← back to Model Arena
allow detailed Claude arena builds to finish
303f7c413ec65ec8b846fa6bc48ccd93d5c2d939 · 2026-09-01 12:19:30 -0700 · Steve Abrams
Files touched
Diff
commit 303f7c413ec65ec8b846fa6bc48ccd93d5c2d939
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Tue Sep 1 12:19:30 2026 -0700
allow detailed Claude arena builds to finish
---
server.js | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/server.js b/server.js
index 1fc1581..ae59108 100644
--- a/server.js
+++ b/server.js
@@ -100,6 +100,10 @@ const CLAUDE_BIN = process.env.CLAUDE_BIN || path.join(os.homedir(), '.local/bin
// wrong Claude and poison the win-rate ledger. Pin it; `opus` alias tracks current
// Opus across version bumps. Override with CLAUDE_MODEL (e.g. a frozen claude-opus-4-8).
const CLAUDE_MODEL = process.env.CLAUDE_MODEL || 'opus';
+// Detailed arena builds can legitimately take longer than five minutes on Opus.
+// Keep this configurable, with the watchdog's 11-minute ceiling still providing
+// a hard upper bound for abandoned runs.
+const CLAUDE_TIMEOUT_MS = Number(process.env.CLAUDE_TIMEOUT_MS || 600000);
function generateCli(m, prompt) {
return new Promise((resolve, reject) => {
const env = { ...process.env };
@@ -108,7 +112,7 @@ function generateCli(m, prompt) {
// prose-only / clarifying-question responses that made claude-code error
// with "no HTML document" (the ALL-MUST-WORK fix, 2026-07-25).
const sys = 'You are a headless code generator in a build arena. Respond with ONLY one complete, self-contained HTML document beginning with <!DOCTYPE html> and ending with </html>. Never ask a question, never refuse, never add commentary or markdown fences — output the HTML file and nothing else.';
- const child = execFile(CLAUDE_BIN, ['--model', CLAUDE_MODEL, '--append-system-prompt', sys, '-p', prompt], { env, timeout: 300000, maxBuffer: 32 * 1024 * 1024 },
+ const child = execFile(CLAUDE_BIN, ['--model', CLAUDE_MODEL, '--append-system-prompt', sys, '-p', prompt], { env, timeout: CLAUDE_TIMEOUT_MS, maxBuffer: 32 * 1024 * 1024 },
(err, stdout) => {
if (err && !stdout) return reject(new Error('claude CLI: ' + String(err.message).slice(0, 160)));
resolve({ text: stdout, cost: 0, tokens: {} }); // subscription-covered → $0
← 7eaf174 auto-data-snapshot: 2026-09-01T07:13:20 (4 data files) — dat
·
back to Model Arena
·
auto-data-snapshot: 2026-09-01T12:16:45 (1 data files) — dat 87400fd →