Skip to content

Add agent context envelope and session state for Discord workflows #270

@michaelmwu

Description

@michaelmwu

Parent: #265

Goal

Add an agent context envelope and session state model so every Discord agent request carries stable source identifiers and can tie planning, confirmation, execution, memory lookup, and audit together through one operation_id.

Scope

  • Add request fields for:
    • operation_id
    • Discord message_id
    • Discord channel_id
    • Discord thread_id
    • optional parent message id
    • response destination visibility
  • Persist or pass session context for:
    • original natural-language request
    • proposed plan
    • confirmation state
    • tool results
    • context sources used
  • Ensure the Discord bot forwards enough metadata for backend policy decisions.

Acceptance criteria

  • Agent requests include stable Discord source identifiers.
  • Planning, confirmation, execution, and audit share the same operation_id.
  • The response destination is represented explicitly enough to prevent private context from being echoed into public channels.
  • Tests cover context envelope serialization and validation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions