Skip to content

Commit 04a1638

Browse files
authored
Merge branch 'main' into codex/autoqa-hidden-pane-unread
2 parents f27c12f + 4fcac74 commit 04a1638

100 files changed

Lines changed: 6886 additions & 4083 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎config/max-lines-baseline.txt‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,6 @@ src/gateway/watch-node-http.ts
706706
src/gateway/worker-environments/bootstrap.ts
707707
src/gateway/worker-environments/inference-runtime.ts
708708
src/gateway/worker-environments/store.ts
709-
src/gateway/worker-environments/worker-turn-launcher.test.ts
710709
src/hooks/install.ts
711710
src/infra/approval-handler-runtime.ts
712711
src/infra/backup-create.test.ts

‎docs/plan/runners.md‎

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,22 @@ Proposal, revision 2. Supersedes revision 1 in place (2026-08-11, operator
1313
decision). Implementation in progress; update this table in every PR that
1414
advances a milestone.
1515

16-
| # | Milestone | Status | PRs |
17-
| --- | ---------------------------------------------------------- | ----------- | ---------------------------------------------------- |
18-
| 0 | This plan (revision 2) | landed | #122454 |
19-
| 1a | Naming: session copy revert | landed | #120667 |
20-
| 1b | Naming: devices consolidation | landed | #120689 |
21-
| 1c | Cleanup: node-pairing → device-pairing merge | landed | #120726 |
22-
| 2 | `openclaw resume` + web Continue in terminal | in progress | #120664, #122870 |
23-
| 3 | `openclaw connect` one-paste onboarding + `/j/` join route | in progress | #120768, #122499 |
24-
| 4 | Picker: grouping, placement, liveness, enrichment | in progress | #120804, #122531, #122635, #122774, #122923 |
25-
| F | Real-wire session boundary harness | landed | #121212 |
26-
| 5 | Public worker ingress path | landed | #122578, #122643 |
27-
| 6 | Node worker provider (device runners) | in progress | #122683, #122769, #122829, #122939, #123013, #123033 |
28-
| 7 | Bundle push consent + runner updates | not started | — |
29-
| 8 | Stop-and-continue moves | not started | — |
30-
| 9 | Deletions (ssh sandbox, openshell, exec-host clones, …) | not started | — |
31-
| 10 | Cloud convergence (provisioners run `openclaw connect`) | not started | — |
16+
| # | Milestone | Status | PRs |
17+
| --- | ---------------------------------------------------------- | ----------- | ---------------------------------------------------------------------- |
18+
| 0 | This plan (revision 2) | landed | #122454 |
19+
| 1a | Naming: session copy revert | landed | #120667 |
20+
| 1b | Naming: devices consolidation | landed | #120689 |
21+
| 1c | Cleanup: node-pairing → device-pairing merge | landed | #120726 |
22+
| 2 | `openclaw resume` + web Continue in terminal | in progress | #120664, #122870 |
23+
| 3 | `openclaw connect` one-paste onboarding + `/j/` join route | in progress | #120768, #122499 |
24+
| 4 | Picker: grouping, placement, liveness, enrichment | in progress | #120804, #122531, #122635, #122774, #122923 |
25+
| F | Real-wire session boundary harness | landed | #121212 |
26+
| 5 | Public worker ingress path | landed | #122578, #122643 |
27+
| 6 | Node worker provider (device runners) | in progress | #122683, #122769, #122829, #122939, #123013, #123033, #122966, #123157 |
28+
| 7 | Bundle push consent + runner updates | not started | — |
29+
| 8 | Stop-and-continue moves | not started | — |
30+
| 9 | Deletions (ssh sandbox, openshell, exec-host clones, …) | not started | — |
31+
| 10 | Cloud convergence (provisioners run `openclaw connect`) | not started | — |
3232

3333
Revision history: revision 1 (2026-08-08) established the session/runner
3434
vocabulary, the naming rulings, and the milestone skeleton after a
@@ -450,9 +450,12 @@ Independently mergeable PR series; 3–5 can interleave after 1c.
450450
blip mid-turn (turn survives), gateway restart with offline device,
451451
credential expiry, slot saturation, dispatch-with-no-live-runner timeout.
452452
The local-install route lands as three PRs: **A** enables node session-host
453-
advertisement and completes receipt/credential provisioning, **B** wires
454-
supervised worker launch, and **C** adds workspace transport. Milestone 7
455-
then upgrades this paired-machine claim to Gateway-pinned bundle bytes.
453+
advertisement and completes receipt/credential provisioning; **B** wires
454+
supervised worker launch with a clean, published HTTP(S) origin-clone
455+
fallback and unchanged-workspace verification; **C** replaces that typed
456+
`workspace-transport-pending` boundary with authenticated workspace
457+
transfer and full reconciliation. Milestone 7 then upgrades this
458+
paired-machine claim to Gateway-pinned bundle bytes.
456459
7. **Bundle push + updates**: consent split, push over paired channel,
457460
version surfacing, stale-node dispatch refusal.
458461
8. **Stop-and-continue moves**: drain + reclaim + re-dispatch to another

‎docs/tools/skills.md‎

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -155,22 +155,21 @@ reference more than one skill:
155155
Use $github and $release_notes to summarize this change for the release.
156156
```
157157

158-
OpenClaw resolves these references against the current agent's eligible,
159-
user-invocable, model-visible skills and tells the model to read each referenced `SKILL.md`
160-
before acting. A single message can reference up to eight distinct skills;
158+
OpenClaw resolves explicit references from authorized senders on every channel
159+
against the current agent's eligible, user-invocable skills and tells the model
160+
to read each referenced `SKILL.md` before acting. A single message can reference up to eight distinct skills;
161161
OpenClaw returns a visible error instead of ignoring extra references. The `$`
162162
form is composable prompt text; `/release_notes ...`
163163
remains the standalone command form and may use direct tool dispatch when the
164164
skill declares `command-dispatch: tool`. Common uppercase shell variables such
165165
as `$HOME`, `$PATH`, and `$EDITOR` remain ordinary text; use lowercase
166-
`$home`, `$path`, or `$editor` to reference skills with those names.
166+
`$home`, `$path`, or `$editor` to reference skills with those names. Escape a
167+
reference as `\$name` when it should stay literal.
167168

168-
Skills with `disable-model-invocation: true` stay out of the `$` picker because
169-
their instructions are intentionally absent from the model's prompt. Invoke
170-
those explicitly with their standalone slash command instead.
171-
172-
`$` references are interpreted on WebChat/Control UI turns. Other messaging
173-
channels keep `$name` as ordinary text; use the skill's slash command there.
169+
Skills with `disable-model-invocation: true` stay out of the `$` picker and the
170+
model's normal prompt, so the model cannot select them on its own. An authorized
171+
explicit `$skill-name` reference still invokes them; the flag only hides the
172+
skill from model-initiated selection.
174173

175174
## Skill Workshop
176175

‎extensions/codex/src/app-server/attempt-notification-state.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,15 @@ export function applyCodexTurnNotificationState(params: {
109109
let turnCrossedToolHandoff = params.turnCrossedToolHandoff;
110110

111111
if (isCurrentTurnNotification) {
112+
// Update item ownership before scheduling progress watches: a started item
113+
// owns its quiet execution window, while its completion starts a new idle window.
114+
updateActiveTurnItemIds(notification, params.activeTurnItemIds);
115+
updateActiveCompletionBlockerItemIds(notification, params.activeCompletionBlockerItemIds);
112116
turnWatches.touchActivity(`notification:${notification.method}`, {
113117
details: describeNotificationActivity(notification),
114118
attemptProgress: true,
115119
});
116120
params.onReportExecutionNotification(notification);
117-
updateActiveTurnItemIds(notification, params.activeTurnItemIds);
118-
updateActiveCompletionBlockerItemIds(notification, params.activeCompletionBlockerItemIds);
119121
if (notification.method === "item/completed" && params.activeTurnItemIds.size === 0) {
120122
params.onScheduleTerminalDynamicToolReleaseCheck();
121123
}

‎extensions/codex/src/app-server/attempt-turn-watches.test.ts‎

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ describe("Codex app-server attempt turn watches", () => {
2323
let completed = false;
2424
let terminalQueued = false;
2525
let activeRequests = 0;
26+
let activeRequestsWithoutTimeout = 0;
2627
let activeItems = 0;
2728
let activeCompletionBlockers = 0;
2829
let activeFinalizationHooks = 0;
@@ -39,6 +40,7 @@ describe("Codex app-server attempt turn watches", () => {
3940
isCompleted: () => completed,
4041
isTerminalTurnNotificationQueued: () => terminalQueued,
4142
getActiveAppServerTurnRequests: () => activeRequests,
43+
getActiveAppServerTurnRequestsWithoutTimeout: () => activeRequestsWithoutTimeout,
4244
getActiveTurnItemCount: () => activeItems,
4345
getActiveCompletionBlockerItemCount: () => activeCompletionBlockers,
4446
getActiveFinalizationHookCount: () => activeFinalizationHooks,
@@ -74,6 +76,9 @@ describe("Codex app-server attempt turn watches", () => {
7476
set activeRequests(value: number) {
7577
activeRequests = value;
7678
},
79+
set activeRequestsWithoutTimeout(value: number) {
80+
activeRequestsWithoutTimeout = value;
81+
},
7782
set activeItems(value: number) {
7883
activeItems = value;
7984
},
@@ -267,6 +272,72 @@ describe("Codex app-server attempt turn watches", () => {
267272
]);
268273
});
269274

275+
it("does not treat a quiet active native item as stalled attempt progress", () => {
276+
const harness = createController();
277+
harness.activeCompletionBlockers = 1;
278+
279+
harness.controller.armAttemptIdleWatch();
280+
harness.controller.touchActivity("notification:item/started", { attemptProgress: true });
281+
vi.advanceTimersByTime(20);
282+
283+
expect(harness.timeouts).toEqual([]);
284+
expect(harness.abortController.signal.aborted).toBe(false);
285+
286+
harness.activeCompletionBlockers = 0;
287+
harness.controller.touchActivity("notification:item/completed", { attemptProgress: true });
288+
vi.advanceTimersByTime(10);
289+
290+
expect(harness.timeouts).toMatchObject([
291+
{
292+
kind: "progress",
293+
idleMs: 10,
294+
timeoutMs: 10,
295+
lastActivityReason: "notification:item/completed",
296+
},
297+
]);
298+
});
299+
300+
it("defers attempt progress to an independently timed app-server request", () => {
301+
const harness = createController();
302+
harness.activeRequests = 1;
303+
304+
harness.controller.armAttemptIdleWatch();
305+
harness.controller.touchActivity("request:item/tool/call:start", { attemptProgress: true });
306+
vi.advanceTimersByTime(20);
307+
308+
expect(harness.timeouts).toEqual([]);
309+
expect(harness.abortController.signal.aborted).toBe(false);
310+
311+
harness.activeRequests = 0;
312+
harness.controller.touchActivity("request:item/tool/call:response", { attemptProgress: true });
313+
vi.advanceTimersByTime(10);
314+
315+
expect(harness.timeouts).toMatchObject([{ kind: "progress" }]);
316+
});
317+
318+
it("keeps attempt progress bounded for an app-server request without its own timeout", () => {
319+
const harness = createController();
320+
harness.activeRequests = 1;
321+
harness.activeRequestsWithoutTimeout = 1;
322+
harness.activeCompletionBlockers = 1;
323+
324+
harness.controller.armAttemptIdleWatch();
325+
harness.controller.touchActivity("request:mcpServer/elicitation/request:start", {
326+
attemptProgress: true,
327+
});
328+
vi.advanceTimersByTime(10);
329+
330+
expect(harness.timeouts).toMatchObject([
331+
{
332+
kind: "progress",
333+
idleMs: 10,
334+
timeoutMs: 10,
335+
lastActivityReason: "request:mcpServer/elicitation/request:start",
336+
},
337+
]);
338+
expect(harness.abortController.signal.reason).toBe("turn_progress_idle_timeout");
339+
});
340+
270341
it("releases a completed assistant item after its interrupted turn completes", async () => {
271342
const harness = createController();
272343

‎extensions/codex/src/app-server/attempt-turn-watches.ts‎

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export function createCodexAttemptTurnWatchController(params: {
3636
isCompleted: () => boolean;
3737
isTerminalTurnNotificationQueued: () => boolean;
3838
getActiveAppServerTurnRequests: () => number;
39+
getActiveAppServerTurnRequestsWithoutTimeout: () => number;
3940
getActiveTurnItemCount: () => number;
4041
getActiveCompletionBlockerItemCount: () => number;
4142
getActiveFinalizationHookCount: () => number;
@@ -136,13 +137,25 @@ export function createCodexAttemptTurnWatchController(params: {
136137
);
137138
}
138139

140+
function shouldPauseAttemptIdleWatch() {
141+
// Native tool items and independently timed dynamic tool requests own quiet
142+
// windows. Approval, elicitation, and user-input requests keep this deadline.
143+
if (params.getActiveAppServerTurnRequestsWithoutTimeout() > 0) {
144+
return false;
145+
}
146+
return (
147+
params.getActiveCompletionBlockerItemCount() > 0 ||
148+
params.getActiveAppServerTurnRequests() > 0
149+
);
150+
}
151+
139152
function scheduleAttemptIdleWatch() {
140153
scheduleWatch(
141154
"attempt",
142155
fireAttemptIdleTimeout,
143156
attemptLastProgressAt,
144157
attemptIdleTimeoutOverrideMs ?? turnAttemptIdleTimeoutMs,
145-
attemptIdleWatchArmed,
158+
attemptIdleWatchArmed && !shouldPauseAttemptIdleWatch(),
146159
);
147160
}
148161

@@ -266,7 +279,12 @@ export function createCodexAttemptTurnWatchController(params: {
266279
}
267280

268281
function fireAttemptIdleTimeout() {
269-
if (params.isCompleted() || params.signal.aborted || !attemptIdleWatchArmed) {
282+
if (
283+
params.isCompleted() ||
284+
params.signal.aborted ||
285+
!attemptIdleWatchArmed ||
286+
shouldPauseAttemptIdleWatch()
287+
) {
270288
return;
271289
}
272290
const idleMs = Math.max(0, Date.now() - attemptLastProgressAt);

‎extensions/codex/src/app-server/run-attempt-server-requests.ts‎

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,13 @@ export function createCodexAttemptServerRequestController(
8282
const projector = projectorRef.current;
8383
let armCompletionWatchOnResponse = false;
8484
let requestCountsAsTurnActivity = false;
85-
const markCurrentTurnRequestProgress = () => {
85+
let requestKeepsAttemptWatchArmed = false;
86+
const markCurrentTurnRequestProgress = (options?: { hasIndependentTimeout?: boolean }) => {
8687
state.activeAppServerTurnRequests += 1;
88+
requestKeepsAttemptWatchArmed = options?.hasIndependentTimeout !== true;
89+
if (requestKeepsAttemptWatchArmed) {
90+
state.activeAppServerTurnRequestsWithoutTimeout += 1;
91+
}
8792
turnWatches.clearCompletionIdleTimer();
8893
turnWatches.disarmAssistantCompletionIdleWatch();
8994
requestCountsAsTurnActivity = true;
@@ -149,13 +154,13 @@ export function createCodexAttemptServerRequestController(
149154
const replayedExecution = openClawDynamicToolExecutions.get(call);
150155
if (replayedExecution) {
151156
armCompletionWatchOnResponse = true;
152-
markCurrentTurnRequestProgress();
157+
markCurrentTurnRequestProgress({ hasIndependentTimeout: true });
153158
state.turnCrossedToolHandoff = true;
154159
return toCodexDynamicToolProtocolResponse(await replayedExecution) as JsonValue;
155160
}
156161
const toolCallOrdinal = allocateCodexToolOutcomeOrdinal?.(call.callId);
157162
armCompletionWatchOnResponse = true;
158-
markCurrentTurnRequestProgress();
163+
markCurrentTurnRequestProgress({ hasIndependentTimeout: true });
159164
state.turnCrossedToolHandoff = true;
160165
pendingOpenClawDynamicToolCompletionIds.add(call.callId);
161166
trajectoryRecorder?.recordEvent("tool.call", {
@@ -348,6 +353,12 @@ export function createCodexAttemptServerRequestController(
348353
} finally {
349354
if (requestCountsAsTurnActivity) {
350355
state.activeAppServerTurnRequests = Math.max(0, state.activeAppServerTurnRequests - 1);
356+
if (requestKeepsAttemptWatchArmed) {
357+
state.activeAppServerTurnRequestsWithoutTimeout = Math.max(
358+
0,
359+
state.activeAppServerTurnRequestsWithoutTimeout - 1,
360+
);
361+
}
351362
const postToolContinuationTimeoutMs =
352363
request.method === "item/tool/call" && state.turnCrossedToolHandoff
353364
? postToolRawAssistantCompletionIdleTimeoutMs

0 commit comments

Comments
 (0)