Skip to content

Soft-skip AI steps that produce no actionable output#1790

Merged
chubes4 merged 1 commit intomainfrom
fix/ai-step-soft-skip
May 5, 2026
Merged

Soft-skip AI steps that produce no actionable output#1790
chubes4 merged 1 commit intomainfrom
fix/ai-step-soft-skip

Conversation

@chubes4
Copy link
Copy Markdown
Member

@chubes4 chubes4 commented May 5, 2026

Summary

  • When the AI step's conversation loop completes without an error but emits no actionable output (no handler tool, no other tool result, no AI text content), set a job_status engine override of agent_skipped - ai_step_no_actionable_output instead of falling through to a generic empty-packet failure.
  • Engine routing then completes that child via the existing status-override branch, so parent batches no longer roll those children up as failed - All N child jobs failed.
  • The new behavior is gated by a datamachine_ai_step_soft_skip_on_empty_output filter (default true) so any pipeline that genuinely needs a hard-fail on empty AI output can opt out without re-pinning the old behavior in core.

Why

For autonomous brain pipelines, the dominant outcome of any source search is: most fetched items don't deserve a wiki page. The pipeline's own system prompt says "skip irrelevant, too-thin, or transient chatter instead of writing filler." Today, every one of those skips renders as failed - empty_data_packet_returned, trips parent batches into failed, and discourages enabling additional source lanes.

This change makes the model's intended skip path the operational skip path.

Fixes #1789.

Testing

  • php tests/ai-step-soft-skip-empty-output-smoke.php (new) — asserts the override completes the job as agent_skipped, persists the soft-skip reason, and does NOT emit datamachine_fail_job. Also asserts the no-override path still fails with empty_data_packet_returned.
  • php tests/ai-error-status-propagation-smoke.php — existing AI failure status propagation still passes.
  • php tests/wp-ai-client-tool-schema-smoke.php
  • php tests/wp-ai-client-request-timeout-smoke.php
  • php -l inc/Core/Steps/AI/AIStep.php

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenCode (GPT-5.5)
  • Used for: Locating the empty-packet fail path, designing the override-based soft-skip, drafting the AIStep change and the new smoke test, and running focused verification. Chris remains responsible for review and merge.

@chubes4 chubes4 merged commit 6c6d2fb into main May 5, 2026
3 checks passed
@chubes4 chubes4 deleted the fix/ai-step-soft-skip branch May 5, 2026 15:09
chubes4 added a commit that referenced this pull request May 5, 2026
* Revert "Soft-skip AI steps that produce no actionable output (#1790)"

This reverts commit 6c6d2fb.

* Skip wp-ai-client prompt arg when no user content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AI child jobs with no writable output should soft-skip, not hard-fail the batch

1 participant