Repository navigation
Description
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
- Have an agent running with available capacity (verified by recent successful schedule executions).
- Call
mcp__trinity__chat_with_agent(defaultparallel=false, no async) with a moderately large message (~5 KB markdown, multiple code fences, multiple sections). - Wait — execution enters running, agent shows healthy, no further activity.
- After 60+ seconds, cleanup service marks execution as failed.
claude_session_idandmodel_usedremainnull.
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
- 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.
- 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).
- 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
- Closes-symptom-of bug: Chat-triggered executions fail with 'Silent launch failure' despite agent being healthy #279 (chat-dispatch silent launch failure — closed 2026-04-07)
- See also bug: Cleanup service misses 'skipped' executions and slow to detect no-session failures #106 (cleanup service slow to detect no-session failures)
- See also bug: APScheduler max_instances=1 causes skipped executions despite agent having parallel slots #132 (APScheduler max_instances=1)
Workaround
Until fix lands, MCP callers can:
- Retry the call (often succeeds on the second try, per bug: Chat-triggered executions fail with 'Silent launch failure' despite agent being healthy #279 anecdote)
- Use
parallel=trueasync mode (async=true) which uses a different dispatch path — untested whether this hits the same bug - Or shorten the message and rely on a follow-up message rather than one large brief
Activity
AndriiPasternak31 commentedon May 11, 2026
/claim
github-actions commentedon May 11, 2026
Claimed by @AndriiPasternak31. Label
status-in-progressadded.Next steps:
feature/686-<short-slug>Fixes #686fix(tests): drop bare sys.modules mutations in chat dispatched-marker…
fix(chat): mark execution dispatched + persist real session_id (#686)
fix(tests): drop bare sys.modules mutations in chat dispatched-marker…
fix(chat): validate agent-supplied session_id before persist (#686)
chore: gitignore quota-* test residue + add CSO audit for #686 branch
fix(tests): drop bare sys.modules mutations in cleanup-orphan test
fix(chat): mark execution dispatched + persist real session_id (#686) (…
1 remaining item
vybe commentedon Jun 1, 2026
Shipped in v0.6.0 (released via #998).
refactor(chat): extract execute+finalize into _run_chat_and_finalize (#…
refactor(chat): decompose chat_with_agent into admit/prepare/execute …
refactor(chat): split routers/chat.py into thin handlers + bounded se…
fix(agent-runtime): stop killing a fan-out turn mid-wait and calling …
fix(retention): the blast-radius guard refuses instead of raising, an…
fix(ratings): close the two holes this PR's own review found (ent#366)
fix(ratings): close the two holes this PR's own review found (ent#366)
fix(ratings): close the two holes this PR's own review found (ent#366)
fix(ratings): close the two holes this PR's own review found (ent#366)