Problem
When calling datamachine/generate-image ability directly (outside a pipeline), the System Agent generates and sideloads the image but does NOT set it as the post's featured image. This is because the deferred retry logic looks for post_id in the pipeline engine data, which doesn't exist for standalone ability calls.
Current behavior
wp_get_ability('datamachine/generate-image')->execute([
'prompt' => 'A woodpecker...',
'post_id' => 13391, // passed but ignored for featured image assignment
]);
// Image generated ✅, sideloaded ✅, featured image NOT set ❌
Expected behavior
If post_id is passed to the ability, the System Agent should use it to set the featured image after sideload — same as it does for pipeline jobs.
Context
Hit this today when generating featured images for 3 orphaned posts (13423, 13404, 13391) via direct ability calls. Had to manually set _thumbnail_id after the jobs completed.
The post_id is already accepted as an input parameter — it just needs to flow through to ImageGenerationTask so the deferred retry can find it.
Problem
When calling
datamachine/generate-imageability directly (outside a pipeline), the System Agent generates and sideloads the image but does NOT set it as the post's featured image. This is because the deferred retry logic looks forpost_idin the pipeline engine data, which doesn't exist for standalone ability calls.Current behavior
Expected behavior
If
post_idis passed to the ability, the System Agent should use it to set the featured image after sideload — same as it does for pipeline jobs.Context
Hit this today when generating featured images for 3 orphaned posts (13423, 13404, 13391) via direct ability calls. Had to manually set
_thumbnail_idafter the jobs completed.The
post_idis already accepted as an input parameter — it just needs to flow through toImageGenerationTaskso the deferred retry can find it.