somratpro Claude Haiku 4.5 commited on
Commit
009eec2
Β·
1 Parent(s): 863a768

Increase Node.js stack size to fix startup recovery overflow

Browse files

Deep issue dependency chains from stalled CEO tasks cause
RangeError in firstBlockedChainFinding recursive DFS.
--stack-size=65536 (64MB vs 1MB default) handles any realistic depth.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>

Files changed (1) hide show
  1. start.sh +1 -4
start.sh CHANGED
@@ -212,12 +212,9 @@ cleanup() {
212
  }
213
  trap cleanup SIGTERM SIGINT
214
 
215
- # Reset stale running agent runs β€” prevents stack overflow in startup recovery
216
- su - postgres -c "psql paperclip -c \"UPDATE agent_run SET status='failed' WHERE status='running';\"" >/dev/null 2>&1 || true
217
-
218
  # ── Launch Paperclip ──────────────────────────────────────────────────────────
219
  echo "Starting Paperclip..."
220
- node --import ./server/node_modules/tsx/dist/loader.mjs server/dist/index.js &
221
  PAPERCLIP_PID=$!
222
 
223
  # Wait for API ready (max 90s)
 
212
  }
213
  trap cleanup SIGTERM SIGINT
214
 
 
 
 
215
  # ── Launch Paperclip ──────────────────────────────────────────────────────────
216
  echo "Starting Paperclip..."
217
+ node --stack-size=65536 --import ./server/node_modules/tsx/dist/loader.mjs server/dist/index.js &
218
  PAPERCLIP_PID=$!
219
 
220
  # Wait for API ready (max 90s)