Agent Teams state is wiped on session restart — teams and tasks do not persist

Resolved 💬 4 comments Opened Mar 12, 2026 by grillir Closed Apr 9, 2026

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

  1. Start a Claude Code session
  2. Create a team via TeamCreate (e.g., team_name: "my-project")
  3. Create tasks via TaskCreate, spawn teammates
  4. Verify files exist at ~/.claude/teams/my-project/ and ~/.claude/tasks/my-project/
  5. Exit the session (or let it crash — e.g., VSCode crash)
  6. Start a new session
  7. Check ~/.claude/teams/ and ~/.claude/tasks/ — both are empty
  8. TaskList returns "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.

View original on GitHub ↗

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