Repository navigation
Replies: 1 comment
Confirmed from source — and the guard is a presence check by design, not an accidentThanks for the trace. It reproduces from the source on const authority = completionAuthority(ctx, execution)
if (hasText(args.objective) || hasRoundCap(args.max_goal_rounds)) {
throw new HarnessError(
'objective and max_goal_rounds are valid only with action edit',
'GOAL_TOOL_INVALID_UPDATE',
)
}with the two predicates at function hasText(value) { return value !== undefined && value !== '' }
function hasRoundCap(value) { return value !== undefined && value !== 0 }Both are presence predicates — neither compares against the stored goal. Your reading of the mechanism is exactly right, and the same check appears a second time in the Why the guard is written this way (worth knowing before changing it): its job is not to catch a mutation attempt, it is to defeat strict-schema filler. Tool arguments are validated against a compiled JSON Schema whose parameter root is an implicitly open object ( One correction to the quoted callIn the tool call you log, The value also cannot have been mirrored straight out of Problem C is real, but the loop is boundedThe driver does not inspect what ended the turn. It re-arms from It is not, however, infinite. At if (goal.roundsStarted >= goal.maxGoalRounds) {
ctx.goals.block(agent, goalRef(goal), {
code: 'round-limit',
message: `Goal reached its configured limit of ${goal.maxGoalRounds} rounds.`,
})
return
}With the cap at 12, the true cost is the remaining rounds of budget plus a wrong terminal phase ( Notes on the two fixesFix 1 — agreed, with two additions.
Fix 2 — not expressible in the current parameter DSL as stated. The author-facing A plugin-side workaround, with a caveatThe check runs inside the tool's own The diagnosis above is offered for whoever owns the fix. With upstream issues and pull requests closed to outside contribution, a third-party patch is not a route we can take here. |
Uh oh!
There was an error while loading. Please reload this page.
Summary / 问题概述
When an Agent completes a long-running goal and attempts to close it using
update_goal(action="complete"), if the tool call includes non-modified, idempotent metadata fields (such as mirroring the currentmax_goal_roundsreturned byget_goal),dsh-tool-goalunconditionally rejects the call:Because the tool call throws an exception, the goal state transition fails and rolls back. The goal remains
phase: "active"andactivation: "armed". Subsequently,goal-round-drivertreats the turn completion as "work still in progress" and automatically triggers another<goal_round>continuation. The agent gets trapped in an infinite continuation loop until it runs out of token budget or is forced to invokeask_user_questionasking the human user to manually close the goal in the GUI.Affected Packages & Versions / 涉及组件
@deepseek-ai/dsh-tool-goal(v0.2.0-rc.2)@deepseek-ai/dsh-goal-round-driver(v0.2.0-rc.2)Actual Reproduction & Event Logs / 真实调用故障现场
In session event logs (
v4.jsonl.zstd):complete:All reactions