Skip to content

Bug: ConversationEnhancer TypeError & StreamUpdate AttributeError break session persistence after long tasks (v1.5.0) #159

@thiswinex

Description

@thiswinex

Description
In Agentic Mode, long-running tasks (~5 mins, 39 turns) successfully complete in the background but fail to save the session context, resulting in a completely new session on the next user message. This happens during standard text messaging (command: "text_message").

Logs & Root Cause
Two distinct bugs occur during the execution flow:

1. StreamUpdate AttributeError (Progress bar fails to update)
During execution, the backend throws continuous warnings:

{"error": "'StreamUpdate' object has no attribute 'get_tool_names'", "event": "Failed to update progress message", "logger": "src.bot.handlers.message", "level": "warning"}

2. ConversationEnhancer TypeError (Session save fails)
After the Claude command completes successfully, saving the context fails due to a signature mismatch:

// Claude finishes successfully
{"session_id": "459cc5cb-fe70-476f-9ac2-168329bd4e8f", "duration_ms": 286857, "num_turns": 39, "is_error": false, "event": "Claude command completed"}

// Persistence breaks
{"error": "ConversationEnhancer.update_context() got an unexpected keyword argument 'session_id'", "event": "Conversation enhancement failed", "logger": "src.bot.handlers.message", "level": "warning"}

Environment

  • Installation: pip install git+https://github.com/RichardAtCT/claude-code-telegram@latest
  • Version: v1.5.0
  • Mode: AGENTIC_MODE=true

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