Repository navigation
Description
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
-
ChatMessageRequestaccepts an optionalparent_execution_id, and the/chatrow-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
/taskchildren - 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
/taskbranches (platform turn header first, typed id held to the header's format,execution_id="manual"opts out,MCP_REPORT_BACK_ENABLED=falsesends nothing), and thereport_backresult field stops sayingoff/sequential_chatfor it - Tests prove the parent reaches
/chatfrom the real toolexecute, and that a child row created through/chatcarries the inherited context
Technical Notes
- Backend:
prepare_chat_executionandrun_chat_turninsrc/backend/services/chat_execution_service.py; the natural home is therun_chat_turn→execute_taskconvergence feat(pull): /chat on the durable queue for pull pilots (#3127) #3145 started. - MCP:
runAgentChatandresolveReportBackinsrc/mcp-server/src/tools/chat.ts(theroute === "chat"arm). - Docs to update when it lands:
docs/memory/requirements/public-access.md§15.1h known limits,docs/memory/feature-flows/channel-completion-report.md. - Follow-up to bug: chat_with_agent never forwards its execution_id argument, so a delegated task cannot report back to the caller's channel #3232.
Activity
vybe commentedon Oct 9, 2026
/claim
github-actions commentedon Oct 9, 2026
Claimed by @vybe. Label
status-in-progressadded.Next steps:
feature/3295-<short-slug>Fixes #3295fix(chat): pass name to the budget-exhausted finalizer; drain only th…
fix(mcp): a post-run 429 on sequential chat reads as answered inline,…
fix(mcp): a sequential chat_with_agent call that ends in a receipt re…
Merge dev; rule the report-back route in the ent875 census (#3295)
Merge dev; declare the report-back route's tier in the ent926 census (#…
Merge dev; rule the report-back route in the ent875 census (#3295)