claude -p does not find tasks from ~/.claude/tasks

Resolved 💬 3 comments Opened Jan 29, 2026 by kenfdev Closed Jan 29, 2026

Bug Description

When using claude -p (non-interactive/piped mode), tasks created via TaskCreate are not found. The command appears to look for tasks in ./.claude/tasks (project-local directory) instead of ~/.claude/tasks (user-level directory), where tasks are actually stored.

Steps to Reproduce

  1. Create tasks using TaskCreate in a normal interactive session — tasks are saved to ~/.claude/tasks/
  2. Run claude -p with a prompt that references tasks (e.g., via TaskList)
  3. Observe that 0 tasks are found

Expected Behavior

claude -p should look for tasks in ~/.claude/tasks/ (the same location where TaskCreate saves them).

Actual Behavior

claude -p looks for tasks in ./.claude/tasks/ (project-local), which is empty since tasks are stored at the user level in ~/.claude/tasks/.

Workaround

Creating a symlink from .claude/tasks to ~/.claude/tasks in the project root makes the tasks visible.

ln -s ~/.claude/tasks .claude/tasks

Environment

  • OS: macOS
  • Claude Code CLI
  • 2.1.23 (Claude Code)

View original on GitHub ↗

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