Skip to content

bug: a sequential chat_with_agent call cannot report back to the caller's conversation #3295

Closed

Description

@AndriiPasternak31

Summary

A sequential chat_with_agent call (parallel=false, served by POST /api/agents/{name}/chat) cannot report its outcome back into the Slack, Telegram or Workspace conversation the calling agent is serving. #3232 makes async delegations (parallel=true, async=true, and the #946 pull-routed sequential path, which already dispatches through /task) carry the caller's turn as parent_execution_id, so their completion is reported back through the ent#224/ent#265 path. The plain sequential path has no field to carry it: ChatMessageRequest (src/backend/models.py) has only message, and /chat creates its execution row without calling _inherited_channel_context, so a sequential child never inherits a conversation and never reports.

This matters when the sequential call does not answer inline: the MCP server aborts its wait at about 25 s and returns a queued_timeout receipt while the turn keeps running, and on a pull pilot /chat is queued work (#3145). In both cases the caller ends its turn with a receipt and the person hears nothing when the work finishes.

Acceptance Criteria

  • ChatMessageRequest accepts an optional parent_execution_id, and the /chat row-creation path resolves channel inheritance through the existing _inherited_channel_context (the ent#265 provenance guard stays the only gate)
  • A sequential child whose caller got a receipt instead of the reply reports at its terminal, through the same consent-gated completion report as /task children
  • A sequential call that answered inline does not also post a second "done" into the conversation (decide and document how: report only on the receipt paths, or suppress when the caller got the reply)
  • The MCP server sends the parent on the sequential branch with the same rules as the /task branches (platform turn header first, typed id held to the header's format, execution_id="manual" opts out, MCP_REPORT_BACK_ENABLED=false sends nothing), and the report_back result field stops saying off / sequential_chat for it
  • Tests prove the parent reaches /chat from the real tool execute, and that a child row created through /chat carries the inherited context

Technical Notes

Activity

  1. added
    priority-p2
    type-bug
    theme-channels
    status-ready
    on Oct 6, 2026
  2. added
    complexity-medium
    and removed
    status-ready
    on Oct 8, 2026
  3. vybe commented on Oct 9, 2026

    @vybe
    Contributor

    /claim

  4. added
    status-in-progress
    on Oct 9, 2026
  5. github-actions commented on Oct 9, 2026

    @github-actions

    Claimed by @vybe. Label status-in-progress added.

    Next steps:

    1. Create branch: feature/3295-<short-slug>
    2. Implement the feature
    3. Open a PR with Fixes #3295
  6. added
    status-in-dev
    on Oct 17, 2026
  7. removed
    status-in-progress
    on Oct 17, 2026
  8. removed
    status-in-progress
    on Oct 17, 2026
  9. removed
    status-in-dev
    on Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

complexity-mediumpriority-p2theme-channelstype-bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions