🤖 feat: add workflow agent graceful timeouts#3625
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 89bcc0aa43
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
89bcc0a to
1e71744
Compare
|
Addressed the Codex findings:
|
|
@codex review Please take another look after the timeout deadline and retry-metadata fixes. |
1e71744 to
b700960
Compare
|
@codex review Please review the refreshed head after the resolved feedback and CI check refresh. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b70096025c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
b700960 to
9fb71a0
Compare
|
Addressed the second Codex findings:
|
|
@codex review Please take another look after the TaskService queue clearing and finalization-token fixes. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9fb71a0b2d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
9fb71a0 to
bacad5c
Compare
|
Addressed the third Codex findings:
|
|
@codex review Please take another look after the background finalization, late-report hard-timeout recheck, and missing-task restart fixes. |
|
@codex review Please review the refreshed head after all third-round threads were resolved. |
bacad5c to
e93578b
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e93578bb3a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
e93578b to
08b647c
Compare
|
Addressed the fourth Codex findings:
|
|
@codex review Please review the refreshed head after all fourth-round threads were resolved. |
08b647c to
05d4ba4
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 05d4ba484a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
05d4ba4 to
afb744b
Compare
|
Addressed the fifth Codex finding:
|
|
@codex review Please review the refreshed head after the timed-out plan-agent completion-tool fix. |
afb744b to
e1790a7
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e1790a74af
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
e1790a7 to
b1750dd
Compare
|
Addressed the sixth Codex findings:
|
b1750dd to
65300b7
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 65300b7f2b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
65300b7 to
6dbb45d
Compare
|
Addressed the seventh Codex finding:
|
|
@codex review Please review the refreshed head after the pipeline sibling-interrupt hard-timeout fix. |
6dbb45d to
9c88651
Compare
|
@codex review Please review the rebased head after conflict resolution. Local validation after rebase:
|
9c88651 to
e74e579
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e74e57915b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
e74e579 to
9598ee8
Compare
|
Addressed the eighth Codex finding:
|
Adds graceful soft/hard timeout handling for workflow-owned agent steps, including durable timeout metadata, finalization prompting, UI timeline events, docs, and tests.
---
Generated with mux • Model: openai:gpt-5.5 • Thinking: xhigh • Cost: 1284639{MUX_COSTS_USD:-0}
|
@codex review Please review the refreshed head after the deferred-grace prompt-acceptance fix. |
9598ee8 to
3aae103
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3aae103701
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
1 similar comment
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5c2a431737
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review Addressed the queued-finalization wait finding in 18bf635. TaskService now returns |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
## Summary Long-lived auto-cleanup PR maintained by the **Auto-Cleanup Agent**. Each pass lands at most one extremely low-risk, behavior-preserving cleanup drawn from recently merged `main` activity, then advances the checkpoint below. Auto-cleanup checkpoint: d3b835a This PR currently contains one cleanup against `main`: 1. `src/node/services/workflows/WorkflowRunner.ts` — extract the duplicated `error instanceof Error && error.name === ...` sentinel-error guard into a shared `isErrorWithName(error, name)` helper. ## This pass This is the first pass of a fresh auto-cleanup PR (the prior one, coder#3606, merged at checkpoint `620c2a66`). Considered the new `main` commits since that checkpoint: - coder#3625 (`feat: add workflow agent graceful timeouts`) - coder#3628 (`fix: apply default budget for model goals`) coder#3625 added agent graceful-timeout handling to `WorkflowRunner.ts`, which introduced two new sentinel-error predicates — `isAgentReportWaitTimeoutError` and `isWorkflowAgentHardTimeoutError` — each re-spelling the identical `error instanceof Error && error.name === "<name>"` shape already used by the pre-existing `isForegroundWaitBackgroundedError`. With three byte-identical guards now in the file, extracted the shared check into a module-level `isErrorWithName(error, name)` helper and delegated all three predicates to it. Behavior-preserving: each predicate still returns the same boolean as before (`isErrorWithName` reproduces the inline expression exactly). The other `instanceof Error` checks in the file test `error.message` inline rather than `error.name`, so they are intentionally left untouched. coder#3628 is a small, self-contained bug fix (default budget for model goals) with no low-risk dedup opportunity. ## Validation - `make static-check` is green for the touched code (ESLint, `tsconfig` + `tsconfig.main.json`, Prettier). (`fmt-shell-check` is the only non-passing step, solely because the `shfmt` binary is absent in this environment; no shell files are touched.) ## Risks Minimal. The change is a pure local extraction of an identical boolean expression; no logic, types, or call semantics change. --- _Generated with `mux` • Model: `anthropic:claude-opus-4-8` • Thinking: `xhigh`_ <!-- mux-attribution: model=anthropic:claude-opus-4-8 thinking=xhigh --> Co-authored-by: mux-bot[bot] <264182336+mux-bot[bot]@users.noreply.github.com>
Summary
Adds explicit graceful timeouts for workflow-owned
agent(...)steps: authors can providetimeout.softMsandtimeout.graceMs, the runner records durable timeout metadata/events, TaskService soft-prompts children for final reports, and hard timeouts fail the workflow step while preserving diagnostic artifacts.Background
Long-running workflow sub-agents could previously hit only a waiter timeout, leaving workflow orchestration without a durable soft-finalization path. This change lets workflows recover partial-but-useful agent findings before escalating to a hard timeout.
Implementation
softMs/graceMsrequirements.propose_planinstead ofagent_report.Validation
MUX_ESLINT_CONCURRENCY=1 make static-checkbun test ./src/node/services/workflows/WorkflowRunner.test.ts ./src/node/services/taskService.test.ts(311 pass)bun test ./src/node/services/workflows/WorkflowRunner.test.ts ./src/node/services/workflows/WorkflowRunStore.test.ts ./src/node/services/taskService.test.ts ./src/browser/hooks/useCoderWorkspace.test.ts ./tests/ui/storybook/budget.test.ts(335 pass, before final hardening rounds)Risks
This touches workflow orchestration, task lifecycle handling, and workflow run UI. The highest-risk areas are races between late reports and hard timeout cleanup, execution-start deadline persistence for queued tasks, queue cleanup during hard timeout, finalization token idempotency, accepted-finalization retry behavior, prompt-acceptance/grace timing, plan-agent completion-tool selection, pipeline sibling cleanup, and resume/retry behavior while a child is finalizing; targeted tests cover those paths.
📋 Implementation Plan
Implementation Plan: Graceful Timeouts for Workflow-Owned Sub-Agents
1. Goal
Add a workflow authoring capability for workflow-owned
agent(...)steps to enforce a time budget without immediately throwing away useful child-agent work.The desired behavior is:
agent_reportwith whatever it has.This plan intentionally does not add raw workflow
setTimeout/setInterval. Time remains a durable runtime concern, not a process-local JavaScript callback.2. Evidence and repo context
Investigation used dedicated Explore agents plus narrow verification of the stream interruption surface.
Verified repo facts used by this plan:
agent(prompt, options)are compiled into__muxAgent(...), which builds a host spec and calls__workflowAgent(spec)(src/node/services/workflows/WorkflowRunner.ts, especiallycompileWorkflowSource,__muxAgent, and the__workflowAgentregistration).WorkflowAgentSpecis parsed/validated inparseWorkflowAgentSpec(...); agent steps require stable IDs and are replay-keyed viahashWorkflowStepInput(spec.id, spec).WorkflowRunStore; resume paths reuse existing started task IDs instead of spawning duplicates.WorkflowTaskServiceAdapter.waitForAgentTask(...)delegates toTaskService.waitForAgentReport(...)and already passes atimeoutMs, but today that timeout is only a waiter timeout: it rejects the waiter with “Timed out waiting for agent_report” and does not stop the child task.TaskService.waitForAgentReport(...)starts its timeout only once the child task reachesrunning; queued/starting time does not consume the execution timeout budget.promptTaskForRequiredCompletionTool(...), with tool policy requiringagent_report/propose_planand recovery-attempt limits.workspaceService.sendMessage(...)queues/rejects based on options. Soft timeout therefore needs to stop/settle the active child turn before the finalization prompt can run.stopStream(workspaceId, { soft, abandonPartial, abortReason });soft: truecancels at a block boundary, and existing task interruption paths useabandonPartial: falseto preserve partial output orabandonPartial: truefor hard termination.src/browser/features/Tools/WorkflowRunToolCall.tsx; task events are coalesced by step/task and generic taskstatusis a string, so workflow-specific statuses such asfinalizingcan be displayed without necessarily adding a global workspace task status.src/node/builtinSkills/workflow-authoring.md; current docs explicitly say workflow conductors cannot use timers,Date, orMath.random.3. Recommended approach and LoC estimates
Recommended v1: per-agent graceful timeout object
Expose only on workflow-owned
agent(...)steps:Net product LoC estimate: ~900–1,400 LoC.
Breakdown, product code only:
Tests, stories, and docs are excluded from the product LoC estimate.
Simpler fallback: hard timeout only
Add
agent(..., { timeoutMs })that fails and terminates after the deadline.Net product LoC estimate: ~250–450 LoC.
This is simpler but not recommended because it discards recoverable findings, code changes, and test evidence from long-running sub-agents.
Deferred larger design: general durable timers/cancellation scopes
Expose
sleep,sleepUntil, and generalwithTimeout(...)/race-like cancellation scopes.Net product LoC estimate: ~1,800–3,000+ LoC.
This should remain separate. General cancellation scopes are valuable but require durable timers, persisted cancellation tokens, branch/race semantics, and more UI surface area. Per-agent graceful timeouts are a narrower vertical slice.
4. Public API design
4.1 Author-facing API
Add a
timeoutobject toagent(prompt, options).Recommended explicitness and validation:
softMsis required whentimeoutis present.graceMsis required whentimeoutis present; omitting it is a parse/runtime error, not an implicit default.softMsandgraceMsmust be finite positive integers.softMs >= 1_000graceMs >= 1_000softMs <= 24hgraceMs <= 1hfinalInstructions, if present, must be a non-empty string under a bounded length such as 4,000 characters.4.2 Behavior guarantees
For a timeout-configured agent step:
running, matching currentwaitForAgentReport(...)timeout behavior; queued/starting time must not count.executionStartedAt,softDeadlineAt,hardDeadlineAt) once the task reachesrunning, instead of deriving deadlines solely from the workflow stepstartedAt.{ runId, stepId, inputHash, taskId, softTimedOutAt }.4.3 Non-goals for v1
setTimeout,setInterval, orDateinside workflow scripts.Promise.race/withTimeoutcancellation scopes.setInterval-style periodic workflow behavior.agent_reportoutput for the step to complete.timeoutmeans no semantic workflow-agent timeout, and presence oftimeoutrequires all durations explicitly.agent.timeoutis absent.running,awaiting_report,interrupted,reported).5. Data model and durable state
5.1 Extend
WorkflowAgentSpecIn
src/node/services/workflows/WorkflowRunner.ts:timeoutmust be part of the replay input hash. Changing timeout values should create a new step identity because it changes orchestration behavior.5.2 Extend workflow step records
Add optional timeout metadata to
WorkflowStepRecordSchemainsrc/common/orpc/schemas/workflow.tsand corresponding inferred types:Rationale:
status: "started" | "completed" | "failed" | "interrupted"can remain unchanged.startedwhile it is in the grace period.recordStepCompleted(...)andrecordStepFailed(...)must preserve existing timeout metadata instead of clobbering it; timeout metadata updates must be atomic/lease-guarded and safe against completion races.5.3 Add workflow timeout events
Add a discriminated event type to
WorkflowRunEventSchema:Use cases:
5.4 Optional workflow task events for coalesced UI rows
Append existing generic
taskevents with workflow-specificstatusstrings:finalizingwhen soft timeout fires and finalization is requested.timed_outwhen hard timeout fires.z.string().min(1), so this does not require a new global task-status enum.Do not initially add
finalizingto persisted workspacetaskStatusunless required. The child workspace can stayrunning,awaiting_report, orinterrupted; the workflow run event log carries the workflow-specific timeout state.6. Runtime implementation plan
Phase 1 — Types, parsing, and author API
Files:
src/node/services/workflows/WorkflowRunner.tssrc/node/workflowRuntime/workflowRuntimeStdlib.jsonly if helper docs/utilities need updatessrc/node/builtinSkills/workflow-authoring.mdsrc/node/services/workflows/WorkflowRunner.test.tsSteps:
__muxAgent(prompt, options)insidecompileWorkflowSource(...)to acceptoptions.timeoutand place it on the host spec.parseWorkflowAgentTimeoutSpec(raw)nearparseWorkflowAgentSpec(...).softMs,graceMs, andfinalInstructions; reject missing durations instead of applying defaults.timeoutinWorkflowAgentSpecbefore hashing.timeout: { softMs }fails becausegraceMsis missing;timeout: { graceMs }fails becausesoftMsis missing;timeoutpreserves existing no-graceful-timeout behavior.Quality gate:
Phase 2 — Durable step timeout metadata and events
Files:
src/common/orpc/schemas/workflow.tssrc/common/types/workflow.tsif explicit helper types are neededsrc/node/services/workflows/WorkflowRunStore.tssrc/node/services/workflows/WorkflowRunStore.test.tssrc/node/services/workflows/WorkflowRunner.tsSteps:
timeoutmetadata toWorkflowStepRecordSchema.timeoutevent variant toWorkflowRunEventSchema.recordStepExecutionStarted(runId, { stepId, inputHash, taskId, executionStartedAt, softDeadlineAt })recordStepSoftTimedOut(runId, { stepId, inputHash, taskId, softTimedOutAt, hardDeadlineAt, finalizationToken })recordStepFinalizationPromptSent(runId, { stepId, inputHash, taskId, finalizationToken, finalizationPromptSentAt })recordStepHardTimedOut(runId, { stepId, inputHash, taskId, hardTimedOutAt })WorkflowRunner.appendEvent(...)/ store calls with expected lease owner where applicable.Quality gate:
WorkflowRunStore.test.tstargeted tests.Phase 3 — TaskService graceful-finalization API
Files:
src/node/services/workflows/WorkflowTaskServiceAdapter.tssrc/node/services/taskService.tssrc/node/services/taskService.test.tssrc/node/services/streamManager.ts/src/node/services/aiService.tsonly if a thin wrapper or abort reason typing is missingAdd
WorkflowTaskAdaptermethods:TaskService behavior for
requestAgentFinalReportForTimeout(...):already_reportedif present.finalizationTokenin child task metadata before sending so a crash/retry can deduplicate the same timeout prompt.not_activeor surface the existing terminal failure.soft: true,abandonPartial: false, and timeout abort reason if available.awaiting_reportwhere appropriate).agent_reportvia tool policy only if thefinalizationTokenhas not already been sent.promptTaskForRequiredCompletionTool(...)safeguards:agent_reportnow.TaskService behavior for
failAgentTaskForHardTimeout(...):abandonPartial: true) where appropriate.Quality gate:
agent_reporttool policy;Phase 4 — WorkflowRunner timeout state machine
Files:
src/node/services/workflows/WorkflowRunner.tssrc/node/services/workflows/WorkflowRunner.test.tssrc/node/services/workflows/WorkflowTaskServiceAdapter.test.tsImplement timeout orchestration as a shared agent-wait helper used by all workflow agent wait paths: single
agent(...),parallel(...), andpipeline(...)(startAgentStepWithoutWaiting/waitForAnyStartedAgentStep). Do not implement only the single-agent path unless timeout usage insidepipeline(...)is explicitly rejected for v1 with a clear parser/runtime error.Recommended helper shape:
State-machine behavior:
spec.timeoutis absent, use the existing wait path unchanged.executionStartedAtandsoftDeadlineAtderived from the child task's first observedrunningtransition; do not use workflow stepstartedAtif it may include queued/starting time.softTimedOutAt:timeoutMs = max(1, softDeadlineAt - now);softTimedOutAt,hardDeadlineAt, andfinalizationToken, then appendtimeout+task finalizingevents;requestAgentFinalReportForTimeout(...)with thefinalizationToken.finalizationPromptSentAtis absent, record it once only after the adapter confirms the prompt was sent or already deduplicated by token. If the adapter saysalready_reported, immediately re-await/read the report.hardDeadlineAtrather than recomputing on every resume.timeout phase: recoveredevent;recordAgentResult(...)path;hardTimedOutAtand appendtimeout phase: hard+task timed_outevents;failAgentTaskForHardTimeout(...);recordStepFailed(...)with a clear timeout message while preserving timeout metadata;Validation retry interaction:
agent_reportpolicy.Parallel/pipeline interaction:
parallel(...)backgrounding/abort semantics say otherwise.Resume/restart interaction:
runningtransition, then persistexecutionStartedAt/softDeadlineAt;softDeadlineAt;finalizationToken;hardDeadlineAt;WorkflowRunnerClock(nowIso,nowMs) for all calculations to make tests deterministic.setTimeoutwaiters.executionStartedAtfrom a TaskService lifecycle callback or TaskService-owned persisted deadline metadata, not from polling unstable status snapshots.Quality gate:
WorkflowRunner.test.tscases for:softDeadlineAt;hardDeadlineAt;finalizationTokenis deduped;Phase 5 — UI, CLI, and observability
Files:
src/browser/features/Tools/WorkflowRunToolCall.tsxsrc/browser/features/Tools/WorkflowRunToolCall.test.tsxsrc/browser/features/Tools/WorkflowRunToolCall.stories.tsxsrc/browser/utils/workflowRunMessages.tsand/or common workflow run message utilities if summaries need timeout wordingUI requirements:
timeoutworkflow events with concise labels:finalizingortimed_outwhen those workflow task events are the latest event.CLI/tool requirements:
task_list/task_awaitdo not need afinalizingstatus.finalizingworkspace task status, update active-status lists intask_await,task_list, CLI formatters, and tests so finalizing tasks remain awaitable and visible.Quality gate:
Phase 6 — Documentation and workflow-authoring skill
Files:
src/node/builtinSkills/workflow-authoring.mdUpdate docs under
agent(prompt, options):timeout.softMs,timeout.graceMs, andtimeout.finalInstructions, emphasizing that Mux provides no default durations.agent_report.Date/Math.random.Quality gate:
6.5 Typed timeout results/errors
Do not branch on the literal string
"Timed out waiting for agent_report"in workflow timeout orchestration.Add a typed error/result boundary, for example:
or a result union from TaskService/adapter wait APIs. The WorkflowRunner timeout state machine should distinguish:
This prevents graceful-timeout logic from accidentally catching unrelated errors whose message happens to include “timeout”.
7. Error messages and prompt text
Standard finalization prompt should be deterministic and concise. Suggested base prompt:
If workflow author provides
finalInstructions, append:Hard-timeout failure message:
8. Edge cases and decisions
8.1 Report arrives exactly as soft timeout fires
Decision: report wins.
Implementation: after catching a soft-timeout wait error, re-check persisted report/failure before recording soft timeout or prompting.
8.2 Report arrives exactly as hard timeout fires
Decision: persisted report wins over termination.
Implementation: acquire the task/workflow lock and re-check report before
terminateAgentTaskForTimeout(...).8.3 Soft finalization prompt send fails
Decision: treat as timeout failure only after recording enough context.
Implementation:
8.4 Child is in a long-running tool call
Decision: soft timeout should interrupt the active turn at a safe boundary before finalization prompt delivery.
Implementation:
stopStream(..., { soft: true, abandonPartial: false })where possible;8.5 Schema validation fails after grace report
Decision: strict schema remains default.
Implementation:
8.6 Workflow run is interrupted while child is finalizing
Decision: normal workflow interruption wins.
Implementation:
8.7 Backgrounded foreground wait
Decision: timeout state is independent of foreground/background UI wait.
Implementation:
9. Testing plan
9.1 Unit/integration tests
Run targeted tests during implementation:
bun test src/node/services/workflows/WorkflowRunner.test.ts --filter timeoutbun test src/node/services/workflows/WorkflowRunStore.test.ts --filter timeoutbun test src/node/services/workflows/WorkflowTaskServiceAdapter.test.ts --filter timeoutbun test src/node/services/taskService.test.ts --filter timeoutbun test src/browser/features/Tools/WorkflowRunToolCall.test.tsx --filter timeoutExact Bun filter syntax may need adjustment to match repo conventions; if filters are awkward, run the specific files.
9.2 Static validation
After implementation:
make typecheckMUX_ESLINT_CONCURRENCY=1 make lintmake testor targeted test suite expansion if full test is too slow/flaky for the workspacemake fmt-checkIf workflow runtime sources are generated from stdlib/docs, run the appropriate generator or static check that fails when generated output is stale.
9.3 Regression tests to preserve existing behavior
timeoutbehave identically.parallel(...)andpipeline(...)behavior remains stable for steps without timeout.10. Dogfooding plan
Dogfooding must produce screenshots and video recordings for reviewer verification.
10.1 Local workflow dogfood setup
./workflows/graceful-timeout-dogfood.jsduring implementation.10.2 Functional dogfood scenarios
Capture evidence for each scenario:
Recovered during grace
Hard timeout
Resume during grace
Parallel lane timeout
10.3 UI dogfood with screenshots/video
Use
agent-browserfor frontend verification:11. Rollout and compatibility
timeout.12. Implementation order
agent(..., { timeout }).13. Open implementation risks
awaiting_reportrecovery behavior as much as possible; avoid creating a parallel recovery system.finalizingstatus becomes necessary, the blast radius expands to active-status lists, CLI formatting, task listing, and cleanup logic. Avoid that unless required.Generated with
mux• Model:openai:gpt-5.5• Thinking:xhigh• Cost:$247.27