Skip to content

bug: InterAgentBus async fails silently when named session ID is stale (after CLI update/cache clear) #81

@alexeymorozua

Description

@alexeymorozua

Summary

When Claude CLI is updated or its session cache is cleared, named session IDs stored in named_sessions.json become invalid. The InterAgentBus attempts to resume these stale sessions and fails silently — the calling agent receives no response and no error.

Steps to Reproduce

  1. Use ask_agent_async.py to send a message between agents (e.g., main → sonic)
  2. Update Claude CLI or clear its session cache
  3. Send another async message — it appears to succeed (returns task_id) but no response is ever delivered

Observed Behavior

  • ask_agent_async.py returns a task_id immediately (looks like success)
  • Bus internally attempts claude --resume <stale_session_id>
  • Claude CLI outputs: No conversation found with session ID: <id>
  • Bus exits with empty output (exit=1), delivers nothing to the caller's Telegram chat
  • No error or warning is shown to either agent

Expected Behavior

When No conversation found with session ID is returned, the bus should:

  1. Discard the stale session ID
  2. Start a fresh session (without --resume)
  3. Deliver the response normally

Workaround

Manually reset session_id to "" in:

  • ~/.ductor/named_sessions.json — sessions from main agent
  • ~/.ductor/agents/<name>/named_sessions.json — sessions from each sub-agent

After reset, the next call creates a fresh session automatically.

Environment

  • Ductor: v0.15.0
  • Claude CLI: updated from 2.1.76 → 2.1.79 (triggered the issue)
  • Multi-agent setup: main + sonic agents

Impact

All async inter-agent communication breaks silently after any Claude CLI update. The only symptom visible to the user is that async responses never arrive.

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions