Skip to content

📚 docs: add background task management guidelines#732

Open
codekiln wants to merge 1 commit intomainfrom
i731-add-background-task-guidelines
Open

📚 docs: add background task management guidelines#732
codekiln wants to merge 1 commit intomainfrom
i731-add-background-task-guidelines

Conversation

@codekiln
Copy link
Owner

Summary

Adds critical guidelines about background task management to CLAUDE.md, specifically warning against using tail -f to monitor background tasks.

Problem

tail -f was used twice to monitor background task output, leaving processes running indefinitely that required manual cleanup with KillShell.

Solution

Added new section to CLAUDE.md with:

  • Clear warning: NEVER use tail -f to monitor background tasks
  • Correct approach: Use TaskOutput tool with block=true
  • Rules for cleanup if tail -f is accidentally started

Changes

  • Added "Background Task Management" section after "Output Token Budget"
  • Documented correct vs incorrect patterns with examples
  • Added rules for handling background tasks properly

Related Issues

Fixes #731


🤖 Generated with Claude Code

Add critical warning about never using tail -f to monitor background tasks,
which leaves processes running indefinitely. Document correct approach using
TaskOutput tool.

Fixes #731
Copilot AI review requested due to automatic review settings January 23, 2026 19:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds critical guidelines to CLAUDE.md about background task management, specifically addressing the problem of using tail -f to monitor background tasks, which leaves processes running indefinitely.

Changes:

  • Added new "Background Task Management" section with clear warnings and best practices
  • Documented correct approach using TaskOutput tool with block=true
  • Provided concrete examples of wrong vs. correct patterns

tail -f /tmp/output.log

# ✅ CORRECT - use TaskOutput with block=true
cargo nextest run --workspace # This runs in background automatically
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two spaces between --workspace and the comment. This should be a single space for consistent formatting.

Suggested change
cargo nextest run --workspace # This runs in background automatically
cargo nextest run --workspace # This runs in background automatically

Copilot uses AI. Check for mistakes.
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.

Add background task management guidelines to CLAUDE.md

1 participant