fix: clear stale session IDs before each llama poll
Some checks failed
ci/woodpecker/push/ci Pipeline failed

Local llama does not support claude --resume (no server-side session
storage). Stale .sid files from failed runs cause agent_run to exit
instantly on every retry, creating an infinite 1-second failure loop.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
johba 2026-03-29 07:00:52 +00:00
parent 59b4cafcfc
commit 8122f2dd5d

View file

@ -30,9 +30,12 @@ fi
log "Entering poll loop (interval: ${POLL_INTERVAL:-300}s)"
# Run dev-poll in a loop as agent user
# Export FORGE_TOKEN so the child process inherits the override
while true; do
# Clear stale session IDs before each poll.
# Local llama does not support --resume (no server-side session storage).
# Stale .sid files cause agent_run to exit instantly on every retry.
rm -f /tmp/dev-session-*.sid 2>/dev/null || true
su -s /bin/bash agent -c "
export FORGE_TOKEN='${FORGE_TOKEN}'
cd /home/agent/disinto && \