Skip to content

P0: Eliminate blocking I/O inside async tool execution #60

@galic1987

Description

@galic1987

Source

ChatGPT security review feedback

Problem

Blocking std::fs and std::io operations inside async fn execute in tools/file.rs and agent execution/checkpointing. This causes:

  • Unstable multi-agent concurrency
  • Potential deadlocks
  • "It hangs sometimes" reputation damage

Fix

  • For filesystem ops requiring sync-only crates (atomic tempfiles), wrap in tokio::task::spawn_blocking
  • For everything else, move to tokio::fs and tokio::io
  • Audit all async fn in src/tools/ and src/agent/ for blocking calls

Note: Some blocking I/O in context_management.rs and interactive.rs was already converted to tokio::fs in recent work. This issue tracks completing the job across all remaining call sites.

Priority

P0 — unlocks stable multi-agent concurrency

Labels

performance, P0

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions