Skip to content

fix(mem-off): make the claude-mem arm's wait.sh actually wait - #63

Open
thedotmack wants to merge 1 commit into
topoteretes:mainfrom
thedotmack:fix/memoff-claude-mem-wait
Open

thedotmack wants to merge 1 commit into
topoteretes:mainfrom
thedotmack:fix/memoff-claude-mem-wait

Conversation

@thedotmack

Copy link
Copy Markdown

What

harness/arms/claude-mem/wait.sh checked pending and processing on the worker's GET /api/processing-status response. The claude-mem worker returns {isProcessing, queueDepth, parkedSessions} (DataRoutes.ts, handleGetProcessingStatus), so neither key ever exists, the condition was always true, and wait.sh returned 0 on its first poll.

In the sequencer, the next issue's session would then start while the observer was still writing memory from the previous one. That skews the claude-mem arm on exactly the linked issues (4/5/7/8) the memory delta measures.

This change reads the real keys and requires isProcessing == false, queueDepth == 0 and parkedSessions == 0. An unreachable worker or a response missing these keys counts as busy, so the script hits the existing timeout and exits non-zero instead of passing silently.

Verified

  • Against a live claude-mem worker that reported {"isProcessing":true,"queueDepth":503,"parkedSessions":0}, the old check exits 0 and the new script keeps polling until it times out (exit 1).
  • Idle response → 0; busy, queued, {} and unreachable port → keep waiting / exit 1 on timeout.

Only wait.sh changes. The arm's other open items (pinned version, wipe_check.sh, injected-context dump, receipt.sh / usage.sh) are still to come; claude-mem will follow up on those.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Vk749zuXTwpz48LMGrjpCK

The worker's GET /api/processing-status returns {isProcessing, queueDepth,
parkedSessions}. wait.sh read `pending` and `processing`, which never exist,
so the check passed immediately and the next issue started while the
observer was still writing memory from the previous one. Read the real keys
and treat an unreachable worker or a malformed response as busy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vk749zuXTwpz48LMGrjpCK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant