Skip to content

Commit b05697e

Browse files
authored
Merge pull request #682 from code-yeongyu/fix/goal-grace-resume-10s
fix(goal): shorten user-grace auto-resume countdown to 10s
2 parents a5c90f1 + 340a3f9 commit b05697e

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

packages/coding-agent/src/core/extensions/builtin/goal/AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ hidden continuation can be queued at a time. The stall notice is goal-wide: from
4646
3rd consecutive toolless continuation turn it prefixes the prompt with `<goal_stall_check>`
4747
and switches between monitor-flavored bullets while monitors are active and generic
4848
recovery bullets otherwise. Accepted direct input disarms a pending continuation,
49-
and a clean accepted user turn arms a visible 60-second grace countdown before the Goal
49+
and a clean accepted user turn arms a visible 10-second grace countdown before the Goal
5050
resumes; mechanically blocked Goals are reactivated on accepted input, including admitted
5151
steering. A `length` stop gets exactly one minimal truncation recovery before the goal
5252
blocks on repetition, terminal provider errors block the goal only when `AgentEndEvent.willRetry`

packages/coding-agent/src/core/extensions/builtin/goal/continuation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const GOAL_CONTINUATION_CAP = 8;
88
export const GOAL_STALL_TOOLLESS_THRESHOLD = 3;
99
export const GOAL_REPETITION_HASH_STREAK = 3;
1010
export const GOAL_LENGTH_RECOVERY_LIMIT = 1;
11-
export const GOAL_USER_GRACE_DELAY_MS = 60_000;
11+
export const GOAL_USER_GRACE_DELAY_MS = 10_000;
1212

1313
export type GoalContinuationPath = "immediate" | "monitorDelayed" | "userGrace" | "sessionStart";
1414

packages/coding-agent/test/suite/goal-continuation-verdict.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,6 @@ describe("goal continuation verdict", () => {
182182
expect(GOAL_STALL_TOOLLESS_THRESHOLD).toBe(3);
183183
expect(GOAL_REPETITION_HASH_STREAK).toBe(3);
184184
expect(GOAL_LENGTH_RECOVERY_LIMIT).toBe(1);
185-
expect(GOAL_USER_GRACE_DELAY_MS).toBe(60_000);
185+
expect(GOAL_USER_GRACE_DELAY_MS).toBe(10_000);
186186
});
187187
});

packages/coding-agent/test/suite/goal-monitor-continuation.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -459,15 +459,15 @@ describe("goal continuation while a monitor is active", () => {
459459

460460
const countdownStarted = waitForGoalStatus(
461461
status,
462-
(update) => update.key === GOAL_WAIT_STATUS_KEY && update.text?.includes("goal resumes in 1m") === true,
462+
(update) => update.key === GOAL_WAIT_STATUS_KEY && update.text?.includes("goal resumes in 10s") === true,
463463
);
464464
await runUserInitiatedTurn(handlers, ctx);
465465
await countdownStarted;
466466
expect(sent).toHaveLength(0);
467467

468468
const countdownAdvanced = waitForGoalStatus(
469469
status,
470-
(update) => update.key === GOAL_WAIT_STATUS_KEY && update.text?.includes("goal resumes in 30s") === true,
470+
(update) => update.key === GOAL_WAIT_STATUS_KEY && update.text?.includes("goal resumes in 5s") === true,
471471
);
472472
await vi.advanceTimersByTimeAsync(GOAL_USER_GRACE_DELAY_MS / 2);
473473
await countdownAdvanced;
@@ -499,7 +499,7 @@ describe("goal continuation while a monitor is active", () => {
499499

500500
const countdownStarted = waitForGoalStatus(
501501
status,
502-
(update) => update.key === GOAL_WAIT_STATUS_KEY && update.text?.includes("goal resumes in 1m") === true,
502+
(update) => update.key === GOAL_WAIT_STATUS_KEY && update.text?.includes("goal resumes in 10s") === true,
503503
);
504504
await runUserInitiatedTurn(handlers, ctx);
505505
await countdownStarted;

0 commit comments

Comments
 (0)