openclaw-vainplex/src/auto-reply
Tyler Yust 8d2f98fb01
Fix subagent announce failover race (always emit lifecycle end + treat timeout=0 as no-timeout) (#6621)
* Fix subagent announce race and timeout handling

Bug 1: Subagent announce fires before model failover retries finish
- Problem: CLI provider emitted lifecycle error on each attempt, causing
  subagent registry to prematurely call beginSubagentCleanup() and announce
  with incorrect status before failover retries completed
- Fix: Removed lifecycle error emission from CLI provider's attempt-level
  .catch() in agent-runner-execution.ts. Errors still propagate to
  runWithModelFallback for retry, but no intermediate lifecycle events
  are emitted. Only the final outcome (after all retries) emits lifecycle
  events.

Bug 2: Hard 600s per-prompt timeout ignores runTimeoutSeconds=0
- Problem: When runTimeoutSeconds=0 (meaning 'no timeout'), the code
  returned the default 600s timeout instead of respecting the 0 setting
- Fix: Modified resolveAgentTimeoutMs() to treat 0 as 'no timeout' and
  return a very large timeout value (30 days) instead of the default.
  This avoids setTimeout issues with Infinity while effectively providing
  unlimited time for long-running tasks.

* fix: emit lifecycle:error for CLI failures (#6621) (thanks @tyler6204)

* chore: satisfy format/lint gates (#6621) (thanks @tyler6204)

* fix: restore build after upstream type changes (#6621) (thanks @tyler6204)

* test: fix createSystemPromptOverride tests to match new return type (#6621) (thanks @tyler6204)
2026-02-02 02:06:14 -08:00
..
reply Fix subagent announce failover race (always emit lifecycle end + treat timeout=0 as no-timeout) (#6621) 2026-02-02 02:06:14 -08:00
chunk.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
chunk.ts chore: Enable "curly" rule to avoid single-statement if confusion/errors. 2026-01-31 16:19:20 +09:00
command-auth.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
command-control.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
command-detection.ts chore: Enable "curly" rule to avoid single-statement if confusion/errors. 2026-01-31 16:19:20 +09:00
commands-args.ts chore: Enable "curly" rule to avoid single-statement if confusion/errors. 2026-01-31 16:19:20 +09:00
commands-registry.data.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
commands-registry.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
commands-registry.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
commands-registry.types.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
dispatch.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
envelope.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
envelope.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
group-activation.ts chore: Enable "curly" rule to avoid single-statement if confusion/errors. 2026-01-31 16:19:20 +09:00
heartbeat.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
heartbeat.ts chore: Enable "curly" rule to avoid single-statement if confusion/errors. 2026-01-31 16:19:20 +09:00
inbound-debounce.ts chore: Enable "curly" rule to avoid single-statement if confusion/errors. 2026-01-31 16:19:20 +09:00
inbound.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
media-note.test.ts refactor: tighten media diagnostics 2026-01-17 07:27:38 +00:00
media-note.ts chore: Enable "curly" rule to avoid single-statement if confusion/errors. 2026-01-31 16:19:20 +09:00
model.test.ts Fix models command (#1753) 2026-01-25 10:02:12 +00:00
model.ts chore: Enable "curly" rule to avoid single-statement if confusion/errors. 2026-01-31 16:19:20 +09:00
reply.block-streaming.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
reply.directive.directive-behavior.accepts-thinking-xhigh-codex-models.e2e.test.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
reply.directive.directive-behavior.applies-inline-reasoning-mixed-messages-acks-immediately.e2e.test.ts chore: Enable "curly" rule to avoid single-statement if confusion/errors. 2026-01-31 16:19:20 +09:00
reply.directive.directive-behavior.defaults-think-low-reasoning-capable-models-no.e2e.test.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
reply.directive.directive-behavior.ignores-inline-model-uses-default-model.e2e.test.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
reply.directive.directive-behavior.lists-allowlisted-models-model-list.e2e.test.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
reply.directive.directive-behavior.prefers-alias-matches-fuzzy-selection-is-ambiguous.e2e.test.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
reply.directive.directive-behavior.requires-per-agent-allowlist-addition-global.e2e.test.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
reply.directive.directive-behavior.returns-status-alongside-directive-only-acks.e2e.test.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
reply.directive.directive-behavior.shows-current-elevated-level-as-off-after.e2e.test.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
reply.directive.directive-behavior.shows-current-verbose-level-verbose-has-no.e2e.test.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
reply.directive.directive-behavior.supports-fuzzy-model-matches-model-directive.e2e.test.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
reply.directive.directive-behavior.updates-tool-verbose-during-flight-run-toggle.e2e.test.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
reply.directive.parse.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
reply.heartbeat-typing.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
reply.media-note.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
reply.queue.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
reply.raw-body.test.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
reply.triggers.group-intro-prompts.e2e.test.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
reply.triggers.trigger-handling.allows-activation-from-allowfrom-groups.e2e.test.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
reply.triggers.trigger-handling.allows-approved-sender-toggle-elevated-mode.e2e.test.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
reply.triggers.trigger-handling.allows-elevated-off-groups-without-mention.e2e.test.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
reply.triggers.trigger-handling.filters-usage-summary-current-model-provider.e2e.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
reply.triggers.trigger-handling.handles-inline-commands-strips-it-before-agent.e2e.test.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
reply.triggers.trigger-handling.ignores-inline-elevated-directive-unapproved-sender.e2e.test.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
reply.triggers.trigger-handling.includes-error-cause-embedded-agent-throws.e2e.test.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
reply.triggers.trigger-handling.keeps-inline-status-unauthorized-senders.e2e.test.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
reply.triggers.trigger-handling.reports-active-auth-profile-key-snippet-status.e2e.test.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
reply.triggers.trigger-handling.runs-compact-as-gated-command.e2e.test.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
reply.triggers.trigger-handling.runs-greeting-prompt-bare-reset.e2e.test.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
reply.triggers.trigger-handling.shows-endpoint-default-model-status-not-configured.e2e.test.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
reply.triggers.trigger-handling.shows-quick-model-picker-grouped-by-model.e2e.test.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
reply.triggers.trigger-handling.stages-inbound-media-into-sandbox-workspace.security.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
reply.triggers.trigger-handling.stages-inbound-media-into-sandbox-workspace.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
reply.triggers.trigger-handling.targets-active-session-native-stop.e2e.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
reply.ts feat: add /exec session overrides 2026-01-18 06:12:54 +00:00
send-policy.ts chore: Enable "curly" rule to avoid single-statement if confusion/errors. 2026-01-31 16:19:20 +09:00
skill-commands.test.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
skill-commands.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
status.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
status.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
templating.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
thinking.test.ts fix: align ZAI thinking toggles 2026-01-16 22:26:43 +00:00
thinking.ts chore: Enable "curly" rule to avoid single-statement if confusion/errors. 2026-01-31 16:19:20 +09:00
tokens.ts chore: Enable "curly" rule to avoid single-statement if confusion/errors. 2026-01-31 16:19:20 +09:00
tool-meta.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
tool-meta.ts chore: Enable "curly" rule to avoid single-statement if confusion/errors. 2026-01-31 16:19:20 +09:00
types.ts feat: Add Line plugin (#1630) 2026-01-25 12:22:36 +00:00