Skip to content

[BUG][regression] Concurrent agents corrupt shared task history index (_index.json) and other history-related files #6

Description

@martin-rueegg

Summary

When multiple Zoo agents/tasks run concurrently in JetBrains IDEs, the shared
task history index becomes corrupted (placeholder task names, size=0, broken
parent/child links). This did not occur with the last Roo Code CE builds
under similar single-agent usage.

Environment

  • IDE: PhpStorm 2026.2.1 / WebStorm 2026.2.1 (build WS-262.9437.145)
  • Java: 25.0.3
  • JCEF Support: Yes
  • Zoo Code JetBrains plugin: 3.76.0 (5b0bcd0c)
  • OS: Windows 11 10.0 (amd64)
  • Multiple agents: yes (One session in Phpstorm, another session in Webstorm, they do NOT both need to actually be active)

Symptoms

  • _index.json entries with placeholder titles (Task #1, Work #1 (no message))
  • size: 0, empty token fields after real work
  • Parent/child metadata inconsistent (childIds / delegatedToId / status)
  • Logs: invalid status transitions (e.g. interrupted → delegated), failed
    persist parent metadata, rehydrate storms
  • not possible to create subtasks (subtask windows opens, then immediately flips back to parent window)

Reproduction

  1. Close your IDEs
  2. Fully backup your ZooCode History (on windows from %USERPROFILE%\.zoo-code\globalStorage\wecode-ai.zoo-code\tasks)
  3. Open project in one IDE with ZooCode plugin
  4. Open another project in another IDE with ZooCode plugin.
  5. Let both perform tool calls so history is saved frequently.
  6. Inspect global _index.json and tasks/<id>/history_item.json. (you may use npx tsx src/cli.ts scan

Why JetBrains matters

JetBrains usage already exercises concurrent agents against one global history store.
VS Code may hit the same race less often; JetBrains makes it visible.

Related

Ask

  • Confirm whether JetBrains host runs multiple task runtimes against the same
    global storage path without serializing index writes.
  • Short-term: serialize history index updates process-wide, or retry on conflict.
  • Do not treat this as “repair the JSON”; the write model is unsafe under concurrency.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions