Skip to content

bug: MCP-triggered chat executions fail with 'Silent launch failure' (regression / parallel codepath of #279) #686

Closed

Description

@pandore

Summary

Same symptom as the closed #279 — Silent launch failure: no Claude session created within 60 seconds — but the failing execution was MCP-triggered, not Chat-UI-triggered. #279 was scoped to routers/chat.py, so this is either an incomplete fix or a parallel dispatch path with the same bug.

The agent (tom-marketing-ops) is fully healthy, claude-runtime-available, and 4 schedule-triggered executions in the same 1-hour window all succeeded normally (12–15s each). The single MCP call hung 70s with no Claude session ever created.

Component

Backend / MCP execution dispatch (mcp__trinity__chat_with_agent)

Priority

P2 — affects agent-to-agent / external MCP automation, including any client that uses chat_with_agent from outside the Chat UI. Reproducible in production today.

Error

Silent launch failure: no Claude session created within 60 seconds

Concrete reproduction (production)

Agent tom-marketing-ops
Trigger MCP (triggered_by: "mcp")
MCP key QId1YLMRh00gZUP8LaKnCg (name: Test1)
Source user [email protected]
Execution ID 19PQqFfJznqXQf0o7DVkVA
Started 2026-05-06T19:10:33.307092Z
Completed 2026-05-06T19:11:42.997219Z
Duration 69690 ms
Status failed
claude_session_id null (never created)
model_used null
business_status null
Message size ~5 KB (multi-section markdown brief)

Same agent, same hour, schedule-triggered → succeeds

Execution ID Trigger Duration Status
ZwT7DiuPCOYdf6UeK-ZXfw schedule 14596 ms success
RtythunivKGbkuk0WQSOVw schedule 12808 ms success
8hPn1vLunHEV7497Wk1aLg schedule 11689 ms success
cmO03cBzpBXkmRvf3zX1Xg schedule 11952 ms success

Schedule path → fine. MCP path → silent fail.

Health check at time of failure

{
  "aggregate_status": "healthy",
  "docker": { "container_status": "running", "cpu_percent": 0.43, "memory_percent": 1.3 },
  "network": { "reachable": true, "latency_ms": 20.43 },
  "business": { "status": "healthy", "runtime_available": true, "claude_available": true, "context_percent": 0, "active_execution_count": 0 },
  "issues": []
}

Reproduction steps

  1. Have an agent running with available capacity (verified by recent successful schedule executions).
  2. Call mcp__trinity__chat_with_agent (default parallel=false, no async) with a moderately large message (~5 KB markdown, multiple code fences, multiple sections).
  3. Wait — execution enters running, agent shows healthy, no further activity.
  4. After 60+ seconds, cleanup service marks execution as failed.
  5. claude_session_id and model_used remain null.

Have not yet tested whether retry succeeds (#279 noted that retries often passed). Also have not tested whether the size of the message matters — possible MCP-path-specific buffer/timeout for large payloads.

Suspected root cause

Per the #279 investigation, the Chat dispatch path was found to have an async background task that silently lost its connection to the agent container. The fix presumably added error logging / retry to that codepath. The MCP execution dispatch is a separate codepath (mcp_router or equivalent) that may have the same untreated bug.

Suggested investigation

  1. Diff the MCP dispatch path against the post-bug: Chat-triggered executions fail with 'Silent launch failure' despite agent being healthy #279 Chat dispatch path — confirm whether the same error-handling/retry was applied to the MCP entry point.
  2. Add explicit logging at the point where the backend hands off to agent-container's agent-server for MCP-triggered executions (mirror whatever was added in bug: Chat-triggered executions fail with 'Silent launch failure' despite agent being healthy #279).
  3. Test with large-payload messages specifically — schedule-triggered messages tend to be small (hundreds of chars), MCP-triggered chats can be much larger. There may be a size threshold beyond which the dispatch hangs silently.

Environment

  • Trinity production
  • Agent: tom-marketing-ops (template: Abilityai/tom-marketing-ops, runtime: claude-code)
  • Triggered from: external Claude Code session via MCP key Test1
  • Date: 2026-05-06

Related

Workaround

Until fix lands, MCP callers can:

Activity

  1. AndriiPasternak31 commented on May 11, 2026

    @AndriiPasternak31
    Contributor

    /claim

  2. added
    status-in-progress
    on May 11, 2026
  3. github-actions commented on May 11, 2026

    @github-actions

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

    Next steps:

    1. Create branch: feature/686-<short-slug>
    2. Implement the feature
    3. Open a PR with Fixes #686
  4. added and removed
    status-in-progress
    on May 11, 2026
  5. 1 remaining item

  6. vybe commented on Jun 1, 2026

    @vybe
    Contributor

    Shipped in v0.6.0 (released via #998).

  7. added
    complexity-low
    theme-reliability
    and removed
    status-in-dev
    on Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

complexity-lowpriority-p2theme-reliabilitytype-bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions