diff options
| author | tanaka takashi <isazaka@gmail.com> | 2026-08-11 05:54:22 +0900 |
|---|---|---|
| committer | tanaka takashi <isazaka@gmail.com> | 2026-08-11 05:54:22 +0900 |
| commit | 7aa4ff5d8403e4c1480faafce0af8d3549276c9f (patch) | |
| tree | 6fe55142e9e8ede756ca5253031473ec4ab7515b /src/Agent.App/Cli | |
| parent | 35719799e62a18850efc52d380fb53bf3baa8022 (diff) | |
Fix PlanAsync fallback and BeginTask TaskGraph conflict
Two runtime bugs discovered during MCP integration testing:
1. PlannerService.BuildTaskGraph fallback: If the LLM-generated plan
contains invalid tasks (bad estimates, cycles, etc.), graph.AddTask
throws PlannerValidationException. Previously this propagated up and
caused "No tasks were executed." or "Planning failed" errors.
Fix: wrap BuildTaskGraph in try/catch, fall back to single-task
graph. Also handle graph.Count == 0 after filtering.
2. TaskGraphToolHandler.BeginTask conflict: PlanAsync stores the
planned TaskGraph in session.TaskGraphs[taskId] before RunAsync
calls BeginTaskAsync. BeginTask then tried TryAdd which failed
because the key already existed, throwing
"TaskGraph for '...' already exists in session".
Fix: use TryAdd without throwing on conflict — if PlanAsync already
created the graph, keep it; otherwise add a new empty one.
Test results: Core 61/61, Planner 10/10, Windows 41/41 (elevated).
MCP integration: agent_run/agent_status verified via HTTP transport.
ACL boundary: C:\Windows\System32 access correctly denied by sandbox.
ToolUseGuard: "Required external effect was not completed" fires
correctly when LLM does not produce verifiable external effect.
Diffstat (limited to 'src/Agent.App/Cli')
0 files changed, 0 insertions, 0 deletions
