Files
Codeman/respawn-fixes.md
T
arkonandClaude Opus 4.5 9aa5973970 fix: rock-solid idle detection in respawn controller
- Add 300-char rolling window to catch working patterns split across PTY chunks
- Check completion message BEFORE working patterns (priority fix)
- Clear rolling window on completion message (transition point)
- Increase working pattern absence threshold from 3s to 8s
- Add Session.isWorking safety check before confirming idle
- Add 20+ more working patterns (Compiling, Building, Processing, etc.)
- Make AI idle checker prompt more conservative (err toward WORKING)
- Update documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 00:55:29 +01:00

4.2 KiB

Suggested Fixes for Respawn Controller Issues

DO NOT EXECUTE - Waiting for user review

Fixes

Fix for Issue #1

Send/wait state stuck

Stuck in waiting_update - the controller is trying to send a command but may not be receiving expected response.

Check terminal output:

curl -sk 'https://localhost:3000/api/sessions/5ecdf859-3605-42d8-b0a2-f8f0a1b5ff98/terminal?tail=10000' | tail -100

Try restarting respawn:

curl -sk -X POST 'https://localhost:3000/api/sessions/5ecdf859-3605-42d8-b0a2-f8f0a1b5ff98/respawn/stop'
curl -sk -X POST 'https://localhost:3000/api/sessions/5ecdf859-3605-42d8-b0a2-f8f0a1b5ff98/respawn/start'

Fix for Issue #2

Check for hung session

The session may be hung. Check:

  1. Session process status:
screen -ls | grep reddit
  1. Attach to screen and check:
screen -r claudeman-w3-reddit-analyse
# Press Ctrl+A D to detach
  1. If hung, restart the session via web UI or:
curl -sk -X POST 'https://localhost:3000/api/sessions/5ecdf859-3605-42d8-b0a2-f8f0a1b5ff98/stop'
# Then start a new session

Fix for Issue #3

Check for hung session

The session may be hung. Check:

  1. Session process status:
screen -ls | grep reddit
  1. Attach to screen and check:
screen -r claudeman-w3-reddit-analyse
# Press Ctrl+A D to detach
  1. If hung, restart the session via web UI or:
curl -sk -X POST 'https://localhost:3000/api/sessions/5ecdf859-3605-42d8-b0a2-f8f0a1b5ff98/stop'
# Then start a new session

Fix for Issue #4

Watching state stuck

The controller is watching but not detecting idle. Possible causes:

  1. Session is actively working (expected behavior)
  2. Idle detection thresholds too high

Check session activity:

curl -sk 'https://localhost:3000/api/sessions/5ecdf859-3605-42d8-b0a2-f8f0a1b5ff98' | jq '{status, lastActivityAt}'

If truly idle, try adjusting config:

curl -sk -X POST 'https://localhost:3000/api/sessions/5ecdf859-3605-42d8-b0a2-f8f0a1b5ff98/respawn/config' -H 'Content-Type: application/json' -d '{"idleThresholdMs": 30000}'

Fix for Issue #5

Check for hung session

The session may be hung. Check:

  1. Session process status:
screen -ls | grep reddit
  1. Attach to screen and check:
screen -r claudeman-w3-reddit-analyse
# Press Ctrl+A D to detach
  1. If hung, restart the session via web UI or:
curl -sk -X POST 'https://localhost:3000/api/sessions/5ecdf859-3605-42d8-b0a2-f8f0a1b5ff98/stop'
# Then start a new session

Fix for Issue #6

Check for hung session

The session may be hung. Check:

  1. Session process status:
screen -ls | grep reddit
  1. Attach to screen and check:
screen -r claudeman-w3-reddit-analyse
# Press Ctrl+A D to detach
  1. If hung, restart the session via web UI or:
curl -sk -X POST 'https://localhost:3000/api/sessions/5ecdf859-3605-42d8-b0a2-f8f0a1b5ff98/stop'
# Then start a new session

Fix for Issue #7

Enable respawn controller

Via API:

curl -sk -X POST 'https://localhost:3000/api/sessions/5ecdf859-3605-42d8-b0a2-f8f0a1b5ff98/respawn/enable'

Or via web UI: Open session tab -> Respawn panel -> Enable

Fix for Issue #8

Enable respawn controller

Via API:

curl -sk -X POST 'https://localhost:3000/api/sessions/5ecdf859-3605-42d8-b0a2-f8f0a1b5ff98/respawn/enable'

Or via web UI: Open session tab -> Respawn panel -> Enable

Fix for Issue #9

Send/wait state stuck

Stuck in waiting_update - the controller is trying to send a command but may not be receiving expected response.

Check terminal output:

curl -sk 'https://localhost:3000/api/sessions/5ecdf859-3605-42d8-b0a2-f8f0a1b5ff98/terminal?tail=10000' | tail -100

Try restarting respawn:

curl -sk -X POST 'https://localhost:3000/api/sessions/5ecdf859-3605-42d8-b0a2-f8f0a1b5ff98/respawn/stop'
curl -sk -X POST 'https://localhost:3000/api/sessions/5ecdf859-3605-42d8-b0a2-f8f0a1b5ff98/respawn/start'

Fix for Issue #10

Enable respawn controller

Via API:

curl -sk -X POST 'https://localhost:3000/api/sessions/5ecdf859-3605-42d8-b0a2-f8f0a1b5ff98/respawn/enable'

Or via web UI: Open session tab -> Respawn panel -> Enable