Repository navigation
feat(server): nudge a thread to delegate once it does the work itself - #149
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
|
Frozen 2026-11-22 CEO portfolio audit — cash-path priority; can reopen at the Dec 18 runway check. |
FINDINGOne independent review pass of the existing changes at ba384a0, against merge base 70e91f5. Reviewer: Codex gpt-6.1-sol through T3; original implementation attribution is Grok. This consumes the PR's single full bot review pass. Further review must be limited to these findings and integration changes.
Focused reproduction used Node 26.13.1, the actual TypeScript function bodies read from the pinned Git objects, and the repository's real MCP tool-name resolver. It proves these state transitions; full reactor restart and provider delivery integration are not proved by this small harness. Existing integration tests cover steer, defer, interrupt/restart deferral, and off-by-default, but omit these two sequences. The two conflict sites against target base 18cf8f2 are the thread-update tool description and run schema fields. Preserve both sides' capabilities. The deploy-line check also currently fails because the body lacks its required Scope/complexity challenge: keep the existing event/projection/reactor architecture and the shared tool resolver. These defects call for bounded state restoration and reminder cancellation, without another worker or service. Setting disable, client/MCP updates, server persistence, client projection, and shipped provider steering policies were inspected. No critical finding was identified. Live provider/browser/native-client behavior remains unverified. {
"reviewed_head": "ba384a095bba0635e8ef52eb72b2cc4cfd3b6ae2",
"reviewer": "Codex gpt-6.1-sol / T3, independent of original Grok implementation",
"findings": [
{"id": "CLO-694/t3-pr149-restart-dedup", "severity": "important", "summary": "Persisted counts restored without seen IDs double count existing tool updates after restart", "outcome": "open"},
{"id": "CLO-694/t3-pr149-deferred-delegation", "severity": "important", "summary": "Delegation retains deferred reminder and sends obsolete without-delegating advice to next run", "outcome": "open"}
]
} |
RESULTRESULT: blocked; tested repair prepared, no commit, push or merge. PR149 original and final remote head: ba384a0. Reviewed merge base: 70e91f5. Current target base pinned for integration diagnostics: 18cf8f2. This is the repair result for the one independent review at #149 (comment), not another full review. Original functions reproduced both findings twice before modification: a repeated existing item after restart raised count1 to count2, and a delegation left the deferred reminder in place. The proposed repair rebuilds counts and the seen-item set together from the current-run projection; preserves the number of reminders already fired; clears deferred reminders when a delegation is observed; suppresses queued delivery after delegation or setting disable; and preserves newer counters if tools finish during delivery. It keeps the existing event/projection/reactor ownership and adds no dependency or service. The original unused Option import was removed. Parent focused independent recheck is required because this reviewer authored the repair. Validation:
The normal commit hook passed format/lint but failed knip on four inherited files: The tested, staged candidate is Git tree 4cb645bb14bc785d0464d11a521155b0a5b5d7bc, not a commit. It remains in the same isolated worktree for parent collection. The patch below includes all three owned repair files, relative to the unchanged original PR head. The parent can inspect that exact delta; no changed-base head-to-head comparison is needed. Target-base integration is still pending: merge-tree diagnosed conflicts in the thread-update tool description and run schema; preserve the compact tool description plus delegation-nudge guidance and retain delegationNudge, delivery, and digest run fields. The target base also has the separate schema lint blocker documented on PR160. Merge is excluded by the assignment's release-effect restriction. The actual trigger is Authored repair for parent focused recheck: diff --git a/apps/server/src/orchestration-v2/DelegationNudge.test.ts b/apps/server/src/orchestration-v2/DelegationNudge.test.ts
new file mode 100644
index 00000000000..5bcca4158ad
--- /dev/null
+++ b/apps/server/src/orchestration-v2/DelegationNudge.test.ts
@@ -0,0 +1,55 @@
+import { TurnItemId } from "@t3tools/contracts";
+import { describe, expect, it } from "vite-plus/test";
+
+import { recordDelegationNudgeItem, restoreDelegationNudgeWatch } from "./DelegationNudge.ts";
+
+const tool = (id: string, toolName: string) => ({
+ id: TurnItemId.make(id),
+ type: "dynamic_tool" as const,
+ toolName,
+});
+
+const recorded = {
+ countedToolCalls: 1,
+ delegations: 0,
+ nudgesFired: 0,
+ topTools: [{ name: "Read", count: 1 }],
+};
+
+describe("delegation nudge recovery", () => {
+ it("does not count an existing tool update again after restoring a persisted run", () => {
+ const item = tool("read", "Read");
+ const watch = restoreDelegationNudgeWatch([item], recorded);
+ recordDelegationNudgeItem(watch, item);
+ expect(watch.stats.countedToolCalls).toBe(1);
+ recordDelegationNudgeItem(watch, tool("command", "Bash"));
+ expect(watch.stats.countedToolCalls).toBe(2);
+ expect(watch.stats.topTools).toEqual([
+ { name: "Bash", count: 1 },
+ { name: "Read", count: 1 },
+ ]);
+ });
+
+ it("includes a tool persisted before restart whose counter event was not committed", () => {
+ const first = tool("read", "Read");
+ const next = tool("next", "Read");
+ const watch = restoreDelegationNudgeWatch([first, next], recorded);
+ recordDelegationNudgeItem(watch, next);
+ expect(watch.stats.countedToolCalls).toBe(2);
+ });
+
+ it("cancels a deferred reminder when the run delegates, including after recovery", () => {
+ const item = tool("read", "Read");
+ const delegated = tool("delegated", "mcp__t3-code__delegate_task");
+ const stats = { ...recorded, nudgesFired: 1, deferredNote: "Delegate now" };
+ const watch = restoreDelegationNudgeWatch([item], stats);
+ recordDelegationNudgeItem(watch, delegated);
+ recordDelegationNudgeItem(watch, delegated);
+ expect(watch.stats.delegations).toBe(1);
+ expect(watch.stats.nudgesFired).toBe(1);
+ expect(watch.stats.deferredNote).toBeUndefined();
+ const restored = restoreDelegationNudgeWatch([item, delegated], stats);
+ expect(restored.stats.delegations).toBe(1);
+ expect(restored.stats.deferredNote).toBeUndefined();
+ });
+});
diff --git a/apps/server/src/orchestration-v2/DelegationNudge.ts b/apps/server/src/orchestration-v2/DelegationNudge.ts
index fd06f3e8dd7..9ba53f8b6ba 100644
--- a/apps/server/src/orchestration-v2/DelegationNudge.ts
+++ b/apps/server/src/orchestration-v2/DelegationNudge.ts
@@ -1,7 +1,4 @@
-import {
- type OrchestrationV2TurnItem,
- type RunDelegationNudgeStats,
-} from "@t3tools/contracts";
+import { type OrchestrationV2TurnItem, type RunDelegationNudgeStats } from "@t3tools/contracts";
import { resolveT3McpToolId } from "@t3tools/shared/t3McpToolPresentation";
/**
@@ -29,7 +26,7 @@ const DELEGATION_TOOLS: ReadonlySet<string> = new Set([
const TOP_TOOL_LIMIT = 5;
-export function countedToolName(item: OrchestrationV2TurnItem): string | null {
+function countedToolName(item: DelegationNudgeItem): string | null {
switch (item.type) {
case "dynamic_tool": {
const id = resolveT3McpToolId(item.toolName);
@@ -49,21 +46,18 @@ export function countedToolName(item: OrchestrationV2TurnItem): string | null {
}
}
-export function isDelegation(item: OrchestrationV2TurnItem): boolean {
+function isDelegation(item: DelegationNudgeItem): boolean {
if (item.type === "subagent") return true;
if (item.type !== "dynamic_tool") return false;
const id = resolveT3McpToolId(item.toolName);
return id !== null && DELEGATION_TOOLS.has(id);
}
-export function emptyDelegationNudgeStats(): RunDelegationNudgeStats {
+function emptyDelegationNudgeStats(): RunDelegationNudgeStats {
return { countedToolCalls: 0, delegations: 0, nudgesFired: 0, topTools: [] };
}
-export function recordCountedTool(
- stats: RunDelegationNudgeStats,
- name: string,
-): RunDelegationNudgeStats {
+function recordCountedTool(stats: RunDelegationNudgeStats, name: string): RunDelegationNudgeStats {
const counts = new Map(stats.topTools.map((tool) => [tool.name, tool.count]));
counts.set(name, (counts.get(name) ?? 0) + 1);
return {
@@ -82,3 +76,46 @@ export function delegationNudgeNote(threshold: number, firm: boolean): string {
: `You've made ${threshold} tool calls on this request without delegating.`;
return `${opening} If this is real work rather than a quick lookup to write a brief, hand it off with delegate_task.`;
}
+
+type DelegationNudgeItem = Pick<OrchestrationV2TurnItem, "id" | "type"> & {
+ readonly toolName?: string | null;
+};
+
+export interface DelegationNudgeWatch {
+ readonly seen: Set<string>;
+ stats: RunDelegationNudgeStats;
+}
+
+export function restoreDelegationNudgeWatch(
+ items: readonly DelegationNudgeItem[],
+ recorded?: RunDelegationNudgeStats,
+): DelegationNudgeWatch {
+ const watch = {
+ seen: new Set<string>(),
+ stats: {
+ ...emptyDelegationNudgeStats(),
+ nudgesFired: recorded?.nudgesFired ?? 0,
+ ...(recorded?.deferredNote === undefined ? {} : { deferredNote: recorded.deferredNote }),
+ },
+ };
+ for (const item of items) recordDelegationNudgeItem(watch, item);
+ return watch;
+}
+
+export function recordDelegationNudgeItem(
+ watch: DelegationNudgeWatch,
+ item: DelegationNudgeItem,
+): void {
+ if (watch.seen.has(item.id)) return;
+ watch.seen.add(item.id);
+ if (isDelegation(item)) {
+ watch.stats = {
+ ...watch.stats,
+ delegations: watch.stats.delegations + 1,
+ deferredNote: undefined,
+ };
+ return;
+ }
+ const name = countedToolName(item);
+ if (name !== null) watch.stats = recordCountedTool(watch.stats, name);
+}
diff --git a/apps/server/src/orchestration-v2/DelegationNudgeReactor.ts b/apps/server/src/orchestration-v2/DelegationNudgeReactor.ts
index 252d1ccec6f..0c70f897720 100644
--- a/apps/server/src/orchestration-v2/DelegationNudgeReactor.ts
+++ b/apps/server/src/orchestration-v2/DelegationNudgeReactor.ts
@@ -14,17 +14,15 @@ import * as Cause from "effect/Cause";
import * as DateTime from "effect/DateTime";
import * as Effect from "effect/Effect";
import * as SqlClient from "effect/sql/SqlClient";
-import * as Option from "effect/Option";
import * as Queue from "effect/Queue";
import * as Stream from "effect/Stream";
import { forkParked } from "../serverActivation.ts";
import {
- countedToolName,
delegationNudgeNote,
- emptyDelegationNudgeStats,
- isDelegation,
- recordCountedTool,
+ recordDelegationNudgeItem,
+ restoreDelegationNudgeWatch,
+ type DelegationNudgeWatch,
} from "./DelegationNudge.ts";
import * as EventSink from "./EventSink.ts";
import * as Orchestrator from "./Orchestrator.ts";
@@ -39,11 +37,6 @@ const COUNTED_TYPES = [
"subagent",
] as const satisfies ReadonlyArray<OrchestrationV2TurnItem["type"]>;
-interface RunWatch {
- readonly seen: Set<string>;
- stats: RunDelegationNudgeStats;
-}
-
interface Reminder {
readonly threadId: ThreadId;
readonly runId: RunId;
@@ -62,20 +55,27 @@ export const make = Effect.gen(function* () {
const projections = yield* ProjectionStore.ProjectionStoreV2;
const sql = yield* SqlClient.SqlClient;
const ids = yield* IdAllocator.IdAllocatorV2;
- const watches = new Map<RunId, RunWatch>();
+ const watches = new Map<RunId, DelegationNudgeWatch>();
// A plain queue, not a transactional one: the fiber that counted the tool is
// still inside the provider batch's transaction, and a transactional offer
// would resume its taker there. The steer then waits for that transaction to
// commit while the commit waits for the subscriber to return.
const reminders = yield* Queue.unbounded<Reminder>();
- const watchFor = (run: OrchestrationV2Run): RunWatch => {
+ const watchFor = Effect.fn("DelegationNudgeReactor.watchFor")(function* (
+ threadId: ThreadId,
+ run: OrchestrationV2Run,
+ ) {
const existing = watches.get(run.id);
if (existing !== undefined) return existing;
- const created = { seen: new Set<string>(), stats: run.delegationNudge ?? emptyDelegationNudgeStats() };
+ const prior = yield* projections.getThreadRecords(threadId, ["turnItems"], {
+ turnItemRunId: run.id,
+ turnItemTypes: [...COUNTED_TYPES],
+ });
+ const created = restoreDelegationNudgeWatch(prior.turnItems, run.delegationNudge);
watches.set(run.id, created);
return created;
- };
+ });
const record = Effect.fn("DelegationNudgeReactor.record")(function* (
threadId: ThreadId,
@@ -83,19 +83,19 @@ export const make = Effect.gen(function* () {
stats: RunDelegationNudgeStats,
) {
const now = yield* DateTime.now;
- yield* eventSink.write({
- events: [
- {
- id: yield* ids.allocate.event({ threadId }),
- type: "run.delegation-nudge-recorded",
- threadId,
- runId: run.id,
- providerInstanceId: run.providerInstanceId,
- occurredAt: now,
- payload: { runId: run.id, stats },
- },
- ],
- });
+ yield* eventSink.write({
+ events: [
+ {
+ id: yield* ids.allocate.event({ threadId }),
+ type: "run.delegation-nudge-recorded",
+ threadId,
+ runId: run.id,
+ providerInstanceId: run.providerInstanceId,
+ occurredAt: now,
+ payload: { runId: run.id, stats },
+ },
+ ],
+ });
});
const deliver = Effect.fn("DelegationNudgeReactor.deliver")(function* (
@@ -104,52 +104,51 @@ export const make = Effect.gen(function* () {
stats: RunDelegationNudgeStats,
note: string,
) {
- const records = yield* projections.getThreadRecords(threadId, [
- "providerThreads",
- "providerTurns",
- "providerSessions",
- ]);
- const providerThread = records.providerThreads.find((row) => row.id === run.providerThreadId);
- const turnRunning = records.providerTurns.some(
- (turn) => turn.runAttemptId === run.activeAttemptId && turn.status === "running",
- );
- // Capabilities are projected with the session, so a reminder can decide
- // without the process-local session the steer effect loads later.
- const turns = records.providerSessions.find(
- (session) => session.id === providerThread?.providerSessionId,
- )?.capabilities.turns;
- // A steer that cancels the running tool, or one the policy would turn into an
- // interrupt-and-restart, waits for the next run instead of stopping this one.
- const canSteer =
- turnRunning &&
- turns?.supportsActiveSteering === true &&
- turns.activeSteeringInterruptsTools !== true &&
- turns.supportsSteeringByInterruptRestart !== true;
- if (canSteer) {
- yield* orchestrator.dispatch({
- type: "message.dispatch",
- commandId: CommandId.make(`server:delegation-nudge:${run.id}:${stats.nudgesFired}`),
- threadId,
- messageId: MessageId.make(`message:delegation-nudge:${run.id}:${stats.nudgesFired}`),
- text: note,
- notification: {
- source: { kind: "system" },
- outcome: "updated",
- summary: "Delegation reminder",
- },
- attachments: [],
- // Queued, like every other server notice: the planner refuses a
- // notification that arrives already steering, then steers this one
- // into the running turn when the provider can take it.
- dispatchMode: { type: "queue_after_active" },
- createdBy: "agent",
- creationSource: "server",
- });
- // The note reached this turn, so the next run must not carry it again.
- const { deferredNote: _delivered, ...delivered } = stats;
- return { ...delivered, deferredNote: undefined };
- }
- return { ...stats, deferredNote: note };
+ const records = yield* projections.getThreadRecords(threadId, [
+ "providerThreads",
+ "providerTurns",
+ "providerSessions",
+ ]);
+ const providerThread = records.providerThreads.find((row) => row.id === run.providerThreadId);
+ const turnRunning = records.providerTurns.some(
+ (turn) => turn.runAttemptId === run.activeAttemptId && turn.status === "running",
+ );
+ // Capabilities are projected with the session, so a reminder can decide
+ // without the process-local session the steer effect loads later.
+ const turns = records.providerSessions.find(
+ (session) => session.id === providerThread?.providerSessionId,
+ )?.capabilities.turns;
+ // A steer that cancels the running tool, or one the policy would turn into an
+ // interrupt-and-restart, waits for the next run instead of stopping this one.
+ const canSteer =
+ turnRunning &&
+ turns?.supportsActiveSteering === true &&
+ turns.activeSteeringInterruptsTools !== true &&
+ turns.supportsSteeringByInterruptRestart !== true;
+ if (canSteer) {
+ yield* orchestrator.dispatch({
+ type: "message.dispatch",
+ commandId: CommandId.make(`server:delegation-nudge:${run.id}:${stats.nudgesFired}`),
+ threadId,
+ messageId: MessageId.make(`message:delegation-nudge:${run.id}:${stats.nudgesFired}`),
+ text: note,
+ notification: {
+ source: { kind: "system" },
+ outcome: "updated",
+ summary: "Delegation reminder",
+ },
+ attachments: [],
+ // Queued, like every other server notice: the planner refuses a
+ // notification that arrives already steering, then steers this one
+ // into the running turn when the provider can take it.
+ dispatchMode: { type: "queue_after_active" },
+ createdBy: "agent",
+ creationSource: "server",
+ });
+ // The note reached this turn, so the next run must not carry it again.
+ return true;
+ }
+ return false;
});
const consider = Effect.fn("DelegationNudgeReactor.consider")(function* (
@@ -162,15 +161,8 @@ export const make = Effect.gen(function* () {
if (setting?.enabled !== true) return;
const run = records.runs.find((candidate) => candidate.id === runId);
if (run === undefined || (run.status !== "running" && run.status !== "starting")) return;
- const watch = watchFor(run);
- if (watch.seen.size === 0 && run.delegationNudge === undefined) {
- const prior = yield* projections.getThreadRecords(threadId, ["turnItems"], {
- turnItemRunId: run.id,
- turnItemTypes: [...COUNTED_TYPES],
- });
- for (const existing of prior.turnItems) apply(watch, existing);
- }
- if (item !== null) apply(watch, item);
+ const watch = yield* watchFor(threadId, run);
+ if (item !== null) recordDelegationNudgeItem(watch, item);
const threshold = setting.thresholds[watch.stats.nudgesFired];
if (
threshold === undefined ||
@@ -205,17 +197,29 @@ export const make = Effect.gen(function* () {
const records = yield* projections.getThreadRecords(input.threadId, ["runs"]);
const run = records.runs.find((candidate) => candidate.id === input.runId);
const watch = run === undefined ? undefined : watches.get(run.id);
- if (run === undefined || watch === undefined || watch.stats.nudgesFired !== input.nudgesFired) {
+ if (
+ run === undefined ||
+ watch === undefined ||
+ watch.stats.nudgesFired !== input.nudgesFired ||
+ watch.stats.delegations > 0 ||
+ records.thread.delegationNudge?.enabled !== true
+ ) {
return;
}
- const stats = yield* deliver(input.threadId, run, watch.stats, input.note);
- if (stats.deferredNote === watch.stats.deferredNote) return;
- watch.stats = stats;
- yield* record(input.threadId, run, stats);
+ const delivered = yield* deliver(input.threadId, run, watch.stats, input.note);
+ if (!delivered || watch.stats.nudgesFired !== input.nudgesFired || watch.stats.delegations > 0)
+ return;
+ const { deferredNote: _delivered, ...stats } = watch.stats;
+ watch.stats = { ...stats, deferredNote: undefined };
+ yield* record(input.threadId, run, watch.stats);
});
const worker = yield* makeDrainableWorker(
- (input: { readonly threadId: ThreadId; readonly runId: RunId; readonly item: OrchestrationV2TurnItem | null }) =>
+ (input: {
+ readonly threadId: ThreadId;
+ readonly runId: RunId;
+ readonly item: OrchestrationV2TurnItem | null;
+ }) =>
consider(input.threadId, input.runId, input.item).pipe(
Effect.catchCauseIf(
(cause) => !Cause.hasInterruptsOnly(cause),
@@ -271,15 +275,3 @@ export const make = Effect.gen(function* () {
return { start, drain: worker.drain };
});
-
-function apply(watch: RunWatch, item: OrchestrationV2TurnItem): void {
- if (watch.seen.has(item.id)) return;
- watch.seen.add(item.id);
- if (isDelegation(item)) {
- watch.stats = { ...watch.stats, delegations: watch.stats.delegations + 1 };
- return;
- }
- const name = countedToolName(item);
- if (name !== null) watch.stats = recordCountedTool(watch.stats, name);
-}
-{
"reviewed_head": "ba384a095bba0635e8ef52eb72b2cc4cfd3b6ae2",
"reviewer": "Codex gpt-6.1-sol / T3; original independent review retained; repair author awaits parent focused recheck",
"findings": [
{
"id": "CLO-694/t3-pr149-restart-dedup",
"severity": "important",
"summary": "Restart deduplication repair is tested locally but unpublished and awaits parent focused independent recheck",
"outcome": "open"
},
{
"id": "CLO-694/t3-pr149-deferred-delegation",
"severity": "important",
"summary": "Deferred reminder cancellation repair is tested locally but unpublished and awaits parent focused independent recheck",
"outcome": "open"
}
]
} |
CHECKPOINTBlocker refinement for the repair result: direct comparison shows target base 18cf8f2 already registers all four inherited knip files in knip.jsonc (mirror-play-apk.cjs, verify-built-boot.ts, resolve-nightly-release.ts, smoke-cli-archive.ts). Therefore do not open a duplicate inventory repair: integrate that existing base after its two upstream Schema.is(ThreadDecisionAsk) lint errors are repaired by their owner. The old PR149 head lacks those entry registrations, which explains its normal commit-hook failure. The two target-base merge conflicts and the parent focused independent recheck remain pending. Original/final remote head stays ba384a0; staged tested candidate tree stays 4cb645bb14bc785d0464d11a521155b0a5b5d7bc. This clarification adds no new full review; important findings remain open and review_gate check returns hold. No source, hook, knip configuration or rollout setting was changed for this clarification. |
ba384a0 to
02a528c
Compare
|
RESULT: complete (not merged, not deployed, by request)
Checks on this head: Deploy line declared, Voice + founder inbox, Voice + inbox core, mobile and web (Linux ARC): all success. Verified locally:
Not verified:
CoS enable step (not run). After deploy, run it from a different thread or a client, never from the CoS thread itself: The thresholds default to 5 and 10. |
b7a40f1 to
9669c2f
Compare
An opt-in per-thread setting counts a root run's own tool calls and, at each threshold, reminds the agent to hand the work off. It steers a running turn only when the provider can take a steer without interrupting the tool in progress; otherwise the note waits for the next run. Off by default, and a thread cannot change its own setting. Model: grok/grok-4.7 Task: feat Agent: Claude Code Co-Authored-By: Claude Code <noreply@anthropic.com>
A notification that arrives already asking to steer is refused, so the reminder never reached the turn. Send it queued, the way the other server notices do, and let the planner steer it when the provider can take it. Model: grok/grok-4.7 Task: fix Agent: Claude Code Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Model: claude-sonnet-5-5
9669c2f to
a7fd4bb
Compare
A thread that does a long piece of work itself never hears that it should have handed it off. Nothing counted the tool calls, and nothing said so.
An opt-in per-thread setting,
delegationNudge, counts a root run's own tool calls and reminds the agent to delegate once it crosses a threshold. It is off unless set. The reminder steers the running turn when the provider can take a steer without interrupting the tool in progress, and otherwise waits and is handed to the next run as context. Orchestrator tools such asdelegate_taskandt3_thread_*are not counted, and a delegation resets the reminders. The setting records who changed it, and a thread cannot change its own.The counts are on each run in
t3_thread_read. The setting is changed witht3_thread_updateactionset_delegation_nudge, or with thethread.delegation-nudge.setcommand.Two shipped providers defer the note rather than steer: Claude's steering interrupts the running tool, and Codex delivers a steer by restarting the turn. The reactor steers only when steering is supported and neither of those is true.
Not enabled anywhere yet. After this deploys, turn it on for the CoS thread (
mcp:launch:4c07a2ef8bc6157f99fbae20642807c05a8a57c53eaec25dd4abfa16bc5b242eon environment2f360b2e-0386-498a-b9cd-62999f3525ba) from a different thread or a client, never from the CoS thread itself:Thresholds are optional and default to 5 and 10.
No Linear issue covers this yet; a search for "delegation nudge" found none, and this session has read-only Linear access, so this PR is the owning record.
Deploy: fleet
Model: grok/grok-4.7, claude-opus-5-5
Task: feat
🤖 Generated with Claude Code