[BUG] /clear command clears task list despite documentation stating tasks should persist

Resolved 💬 3 comments Opened Feb 5, 2026 by janu75 Closed Feb 9, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When using the /clear command to clear conversation history, the task list is also cleared. This contradicts the documentation which states that tasks should persist across context compactions and the /clear command should only clear conversation history.

I tested this behavior in two separate projects and confirmed that tasks created with TaskCreate are deleted after running /clear.

What Should Happen?

According to the documentation, tasks should persist after running /clear. The /clear command should only clear the conversation history, not the task list. Tasks should remain accessible via TaskList after the context is cleared.

Error Messages/Logs

Steps to Reproduce

  1. Start a Claude Code session in any project
  2. 2. Create a task using TaskCreate tool with any subject and description
  3. 3. Verify the task exists by running TaskList
  4. 4. Run the /clear command to clear conversation history
  5. 5. Check the task list again using TaskList

Expected Result: Task should still be present in the list
Actual Result: TaskList returns "No tasks found"

I reproduced this behavior in multiple independent projects and confirmed it occurs consistently.

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.31 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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