Background task completion notifications persist after compaction

Resolved 💬 3 comments Opened Feb 15, 2026 by abecutter Closed Feb 19, 2026

Description

After running /compact following a session with spawned background tasks, stale task completion notifications appear in the output:

● Task "Agent 1: Fix bug #93" completed in background
● Task "Agent 3: WP #90 trim skill" completed in background
● Task "Agent 2: WP #89 compaction" completed in background
...

These notifications are no longer actionable - the work has already been merged, results already reviewed. They appear to persist in the context and resurface after compaction.

Expected Behavior

Background task completion notifications should be treated as ephemeral status updates and excluded from compaction context. They're useful when they first appear (to prompt checking results), but not after the work is done.

Current Behavior

Notifications persist and reappear after compaction, creating noise in the conversation.

Reproduction

  1. Run /spawn N --tasks X,Y,Z -a to spawn background agents
  2. Wait for agents to complete and merge their work
  3. Run /session-end
  4. Run /compact
  5. Observe stale task completion notifications in output

Suggested Fix

Exclude Task "..." completed in background notifications from the context that gets preserved during compaction, similar to how other transient UI elements are handled.

View original on GitHub ↗

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