Agent repeatedly polls background tasks despite explicit user instructions to stop

Resolved 💬 3 comments Opened Apr 8, 2026 by bakerem Closed Apr 11, 2026

Description

When a background task is running, Claude Code repeatedly reads the task output file to check for progress, even after the user has:

  1. Explicitly asked it to stop polling multiple times
  2. Claude acknowledged the feedback and even updated a memory file about it
  3. The user escalated ("you did it again. What's the deal")

The polling continues as an apparent compulsive loop where Claude reads the same output file over and over (observed 15+ times in a single conversation), always getting the same result, despite having no new information to act on.

Expected behavior

When a command is run with run_in_background: true, Claude should wait for the completion notification and not poll the output file unless the user asks for a status update.

Actual behavior

Claude keeps issuing cat commands to read the background task output file in a tight loop, even after being told to stop. The behavior persists across multiple user corrections within the same conversation.

Environment

  • Model: claude-opus-4-6 (1M context)
  • Platform: Linux (WSL2)
  • The background task was a long-running Python script (~30+ minutes)

Reproduction

  1. Start a long-running command with run_in_background: true
  2. Tell Claude to wait and not poll
  3. Observe that Claude continues to poll the output file

🤖 Generated with Claude Code

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗