Skip to content

Periodic conversations become zombies after auto-archive for acp_start_failures #51

Description

@inercia

Summary

When a periodic conversation is auto-archived due to acp_start_failures, the periodic scheduler continues delivering prompts. This revives the ACP connection, but the archived flag is never cleared — leaving the conversation in a contradictory "zombie" state: archived: true + is_running: true + is_prompting: true + status: active.

Steps to Reproduce

  1. Create a periodic conversation with a recurring prompt
  2. Have the ACP connection fail repeatedly (e.g., API downtime)
  3. Mitto auto-archives the conversation with archive_reason: acp_start_failures
  4. Wait for the next periodic prompt delivery
  5. The ACP connection recovers and the agent starts responding
  6. Observe: archived: true but is_running: true, is_prompting: true, status: active

Observed Behavior

The conversation is simultaneously archived and actively running. The periodic scheduler ignores the archived flag and keeps enqueueing prompts. When the ACP connection recovers, the agent runs normally — but the UI likely shows the conversation as archived.

Found 3 conversations in this state in the investments workspace:

  • "Portfolio Analysis" (20260505-133519-8d5c9195) — periodic, zombie state
  • "Job Income Report" (20260505-113131-c42307ec) — periodic, zombie state
  • "Opportunities Scanner" (20260505-115908-964bffc0) — not periodic but had stale archived+active flags

Expected Behavior

One of:

  1. Don't auto-archive periodic conversations for transient ACP failures — use retry with backoff instead
  2. Auto-unarchive when the ACP connection successfully restarts after an acp_start_failures archive
  3. Stop the periodic scheduler when a conversation is archived (regardless of reason)

Option 1 seems best for periodic conversations — they're meant to be long-lived, and transient ACP failures shouldn't permanently disable them.

Workaround

Manually unarchive the conversation via mitto_conversation_archive(archived=false).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions