Preflight Checklist
What's Wrong?
Running /clear wipes out the task list created via TaskCreate, making all tasks inaccessible via TaskList. This contradicts the documented behavior which states tasks persist across context operations since they are stored on disk at ~/.claude/tasks/.
This issue was previously reported in #18081 and #23316, both of which were closed as stale/duplicate without a fix being shipped. The bug is still reproducible on the latest version.
Repro:
- Start a Claude Code session
- Create a task using
TaskCreate with any subject/description
- Verify the task exists via
TaskList
- Run
/clear
- Run
TaskList again
Expected: Task persists — it is stored on disk, not in conversation memory
Actual: TaskList returns "No tasks found"
What Should Happen?
/clear should only clear conversation history. Tasks stored in ~/.claude/tasks/ should remain accessible via TaskList after /clear because they are a disk-based construct, not an in-memory/conversation construct.
Error Messages/Logs
> TaskList
No tasks found
Steps to Reproduce
- Start a Claude Code session in any project
- Create a task:
TaskCreate with subject "Test task"
- Confirm it exists:
TaskList → task appears
- Run
/clear
- Run
TaskList again → "No tasks found"
Related Issues
Claude Model
claude-sonnet-4-6
Is this a regression?
No — this has been present across multiple versions per the referenced issues
Claude Code Version
Latest (2.x)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
The workaround of using CLAUDE_CODE_TASK_LIST_ID=my-project claude to name a task list may help in some cases, but the core bug — that /clear destroys disk-persisted tasks — should be fixed so the tool behaves as documented.
Preflight Checklist
What's Wrong?
Running
/clearwipes out the task list created viaTaskCreate, making all tasks inaccessible viaTaskList. This contradicts the documented behavior which states tasks persist across context operations since they are stored on disk at~/.claude/tasks/.This issue was previously reported in #18081 and #23316, both of which were closed as stale/duplicate without a fix being shipped. The bug is still reproducible on the latest version.
Repro:
TaskCreatewith any subject/descriptionTaskList/clearTaskListagainExpected: Task persists — it is stored on disk, not in conversation memory
Actual:
TaskListreturns "No tasks found"What Should Happen?
/clearshould only clear conversation history. Tasks stored in~/.claude/tasks/should remain accessible viaTaskListafter/clearbecause they are a disk-based construct, not an in-memory/conversation construct.Error Messages/Logs
> TaskList No tasks foundSteps to Reproduce
TaskCreatewith subject "Test task"TaskList→ task appears/clearTaskListagain → "No tasks found"Related Issues
Claude Model
claude-sonnet-4-6
Is this a regression?
No — this has been present across multiple versions per the referenced issues
Claude Code Version
Latest (2.x)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
The workaround of using
CLAUDE_CODE_TASK_LIST_ID=my-project claudeto name a task list may help in some cases, but the core bug — that/cleardestroys disk-persisted tasks — should be fixed so the tool behaves as documented.