A tool call exempt from the tool timeout (delegate_to_agent) runs past the 30-minute round cap and the round is cut mid-tool-call

Chiusa
#5,915 17 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
49/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
csharp
Ambito
backend

Direzione di ricerca

Start with plugins-repo/src/MeshWeaver.AI/StreamStallGuardChatClient.cs to inspect the round-duration watchdog and its abort message, then trace the tool-invocation path in plugins-repo/src/MeshWeaver.AI/ChatClientAgentFactory.cs at AccessContextAIFunction.InvokeGuardedAsync. Compare the reported timeout with the Feedback Agent sub-thread spawned at 06:59:28Z to determine whether that delegation hung or exceeded the budget. Done means the guard handles tool-call waits accurately and no longer misattributes this failure to a stalled model stream.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug sev:L

What is failing

The 30-minute maximum-round-duration guard in the agent chat client aborted a bug-triage round while it was waiting on an in-flight tool call (a delegate_to_agent delegation to the Feedback Agent), not while streaming from the model — and its error message misattributes the abort to "the model endpoint stopped responding mid-stream". The round's work up to that point (including a completed Worker delegation that set bugPhase: blocked) was lost and the thread must be resubmitted.

Probable cause

The round-budget watchdog fires on wall-clock time regardless of what the round is waiting on, and its message hard-codes a model-endpoint-stall diagnosis (high confidence on mechanism, medium on root cause of the hang). Evidence from the affected round (Hosting/Triage/_Thread/bug-systemorph-meshweaver-5910/e693ac26, round for issue Systemorph/MeshWeaver#5910): all 12 model calls to openai/gpt-6-luna completed normally, the last at 06:59:04Z; the final delegate_to_agent call to the Feedback Agent started at 06:59:28Z and ran ~23.6 minutes without returning until the guard aborted the round at 07:23:03Z. Two distinct defects are visible:

  1. The guard aborts rounds mid-tool-call and the abort text names the wrong culprit — the model endpoint demonstrably did not stall here.
  2. The Feedback Agent delegation never completed within the round budget — either the sub-agent hung or it legitimately needs longer than a round lasts. Which of those two is true is unclear from this single occurrence.

Impact

Low. One occurrence, one pod, one round of one automated bug-triage thread; recovery is manual resubmission and no user-facing data was lost. But the defect silently wastes up to 30 minutes per occurrence and produces a misleading diagnostic that will misdirect anyone triaging future occurrences.

Where to look

  • plugins-repo/src/MeshWeaver.AI/StreamStallGuardChatClient.cs — the round-duration watchdog and its abort message; it should distinguish "waiting on model stream" from "waiting on tool invocation", and ideally not abort rounds with healthy model calls.
  • plugins-repo/src/MeshWeaver.AI/ChatClientAgentFactory.cs (AccessContextAIFunction.InvokeGuardedAsync, ~line 1286) — where the abort surfaced, inside the tool-invocation path.
  • The Feedback Agent sub-thread spawned at 06:59:28Z — why it produced no result for ~23.6 minutes.

Related but distinct: incident Admin/_LogIncident/8bfa7322a2e2815c → issue #5859 covers the same guard firing on genuine provider-stream stalls. This ticket is the same abort log site but a different failure path — tool-call hang, not provider stall. If triage disagrees, this can be closed as a sibling of #5859.


Evidence
Fingerprint 40388f76dcd94230
Category MeshWeaver.AI.AgentChatClient
Severity Error
Exception System.TimeoutException
Top frame MeshWeaver.AI.AccessContextAIFunction.InvokeGuardedAsync(AIFunctionArguments arguments, CancellationToken cancellationToken)
Namespace memex
Pods memex-portal-deployment-855468d589-tkvnv
Occurrences 1
First seen 2026-09-30 07:23:03Z
Last seen 2026-09-30 07:23:03Z
Routing not determined — no configured route matches the category MeshWeaver.AI.AgentChatClient. This repository is the configured fallback, not a finding about who owns the fault; the category names the LOGGER, which may not be the subject.
Recent log lines
2026-09-30 07:23:03Z memex-portal-deployment-855468d589-tkvnv fail: MeshWeaver.AI.AgentChatClient[0]
      [ThreadExec] ERROR: 07:23:03.124 threadPath=Hosting/Triage/_Thread/bug-systemorph-meshweaver-5910
      System.TimeoutException: AI streaming exceeded the maximum round duration of 00:30:00 and was aborted (#147). The model endpoint stopped responding mid-stream; resubmit to retry.
       ---> System.Threading.Tasks.TaskCanceledException: A task was canceled.
         at Microsoft.Extensions.AI.AIFunctionFactory.ReflectionAIFunctionDescriptor.<>c__DisplayClass41_1.<<GetReturnParameterMarshaller>b__12>d.MoveNext()
      --- End of stack trace from previous location ---
         at Microsoft.Extensions.AI.AIFunctionFactory.ReflectionAIFunction.InvokeCoreAsync(AIFunctionArguments arguments, CancellationToken cancellationToken)
         at Microsoft.Extensions.AI.AIFunctionFactory.ReflectionAIFunction.InvokeCoreAsync(AIFunctionArguments arguments, CancellationToken cancellationToken)
         at MeshWeaver.AI.AccessContextAIFunction.InvokeGuardedAsync(AIFunctionArguments arguments, CancellationToken cancellationToken) in /home/runner/work/MeshWeaver/MeshWeaver/plugins-repo/src/MeshWeaver.AI/ChatClientAgentFactory.cs:line 1286
         at MeshWeaver.AI.AccessContextAIFunction.InvokeCoreAsync(AIFunctionArguments arguments, CancellationToken cancellationToken) in /home/runner/work/MeshWeaver/MeshWeaver/plugins-repo/src/MeshWeaver.AI/ChatClientAgentFactory.cs:line 1223
         at Microsoft.Extensions.AI.FunctionInvocationProcessor.InstrumentedInvokeFunctionAsync(FunctionInvocationContext context, CancellationToken cancellationToken)
         at Microsoft.Extensions.AI.FunctionInvocationProcessor.ProcessSingleFunctionCallAsync(FunctionCallContent callContent, Func`2 findTool, Int32 callIndex, Func`4 createContext, Action`1 setCurrentContext, Boolean captureExceptions, CancellationToken cancellationToken)
         at Microsoft.Extensions.AI.FunctionInvocationProcessor.ProcessFunctionCallsAsync(List`1 functionCallContents, Func`2 f…[truncated]

Opened automatically from Admin/_LogIncident/40388f76dcd94230. Recurrences are folded into this issue rather than opening new ones.
It also stands for the whole log site 859e0e97908c6c8b: other fingerprints of this site fold in here as comments rather than opening tickets of their own.

Lingua principale
C#
Stelle
12
Fork
5
Merge medio
5h 10m
PR unite (30g)
981

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Systemorph/MeshWeaver

Tutte le issue di Systemorph/MeshWeaver

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.