Skip to content

Introduce the concept of conversation ID #157

Closed

Description

@xingyaoww

In event serialization / persistence (#41) and task tracker tool (#148), we need a unique ID per conversation so we can save files related to this conversation to a consistent place.

We should add .id attribute to Conversation, it should just be a uuid.

Activity

  1. added
    openhands
    on Sep 8, 2025
  2. openhands-ai commented on Sep 8, 2025

    @openhands-ai

    I'm on it! xingyaoww can track my progress at all-hands.dev

    🔴 Solvability: HARD

    This issue appears to be completely empty with no title or description provided, making it impossible to understand what problem needs to be solved. The lack of any contextual information, technical details, or problem description creates significant barriers to resolution.

    You can make the issue easier to resolve by addressing these concerns in the conversation:

    • Provide a clear title and detailed description of the problem you're experiencing
    • Include specific error messages, code snippets, or examples that demonstrate the issue
    • Add information about your environment, setup, and steps to reproduce the problem

  3. added a commit that references this issue on Sep 8, 2025
    f637ecb
  4. openhands-ai commented on Sep 8, 2025

    @openhands-ai

    Summary

    I have successfully implemented the conversation ID feature as requested in issue #157. Here's what was accomplished:

    ✅ Request Completion Checklist:

    • Added .id attribute to Conversation class - Each conversation now gets a unique UUID identifier
    • Used UUID as specified - Implemented using uuid.uuid4() following the same pattern as the event system
    • Enables event serialization/persistence - ID is stored as a string for easy serialization
    • Supports task tracker functionality - Provides consistent conversation identification
    • Added comprehensive tests - Created test_conversation_id.py with 3 test cases
    • Maintained backward compatibility - No breaking changes to existing functionality
    • Followed coding standards - All pre-commit hooks pass

    🔧 Changes Made:

    1. Modified openhands/sdk/conversation/conversation.py:

      • Added import uuid
      • Added self.id = str(uuid.uuid4()) to constructor
    2. Created tests/sdk/conversation/test_conversation_id.py:

      • Test that each conversation gets a unique UUID
      • Test that different conversations have different IDs
      • Test that conversation ID persists throughout lifecycle

    ✅ Quality Assurance:

    • All new tests pass (3/3)
    • All existing conversation tests continue to pass (18/18)
    • Pre-commit hooks pass (formatting, linting, type checking)
    • No breaking changes introduced

    🚀 Delivery:

    The implementation provides exactly what was requested: a unique UUID identifier for each conversation that can be used for event serialization/persistence and task tracker functionality, with comprehensive test coverage and no breaking changes.

    View full conversation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    openhands

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions