Agent Teams state is wiped on session restart — teams and tasks do not persist
Summary
Agent Teams state stored at ~/.claude/teams/ and ~/.claude/tasks/ does not persist across sessions. When a Claude Code session exits (including crashes), the directories are emptied on next session startup, destroying all team configuration, task lists, and coordination state.
Expected Behavior
Per the TeamCreate tool specification:
- Team files are created at
~/.claude/teams/{team-name}.json - Task lists are created at
~/.claude/tasks/{team-name}/ - These are filesystem-backed and should persist until explicitly deleted via
TeamDelete
A team created in one session should be discoverable and resumable in subsequent sessions.
Actual Behavior
On session startup, ~/.claude/teams/ and ~/.claude/tasks/ are wiped clean (directories recreated as empty). All team config, task lists, member registrations, and task state are lost.
Reproduction Steps
- Start a Claude Code session
- Create a team via
TeamCreate(e.g.,team_name: "my-project") - Create tasks via
TaskCreate, spawn teammates - Verify files exist at
~/.claude/teams/my-project/and~/.claude/tasks/my-project/ - Exit the session (or let it crash — e.g., VSCode crash)
- Start a new session
- Check
~/.claude/teams/and~/.claude/tasks/— both are empty TaskListreturns "No tasks found"
Impact
This makes Agent Teams unusable for any multi-session project. In practice, teams are set up for complex, multi-day workstreams. Losing all team and task state on every session restart means:
- Task lists with dependency tracking must be manually recreated
- Team member configurations are lost
- Completed/in-progress task status is destroyed
- No continuity between sessions for coordinated agent work
Environment
- Claude Code (VS Code extension)
- macOS (Darwin 25.3.0, arm64)
- Model: claude-opus-4-6-v1
Workaround
Maintain a separate team manifest and task snapshot in the project directory (outside ~/.claude/) and manually recreate the team on each new session. This is fragile and defeats the purpose of the built-in team infrastructure.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗