#28295·directus

[Bug] Update Item Operation in Directus Flow emits stale event data via WebSockets / Subscriptions

Author: ngocthachnguyenCreated Sep 25, 2026Updated Sep 29, 2026

Describe the Bug

I am experiencing an issue where a Directus Flow operation updates a record successfully in the database, but the emitted event payload received by WebSocket subscribers contains stale data from a previous state/flow execution.

To Reproduce

Environment: Directus Version: 12.2.0 Database: PostgreSQL Realtime / Subscriptions: WebSockets

Steps to Reproduce & Observed Behavior

  1. Execution of Flow 1 (First Flow) Operation: Update Data (update_wallet) Collection: wallet_accounts Emit Events: Enabled Result: The database record updates correctly (version: 22), and WebSocket subscribers receive the expected update payload: [2026-09-21T11:45:09.504Z] UPDATE RECEIVED [ { "id": "7d37fe0e-ddba-4e11-86bf-109bf01c5412", "user_id": "fdc0d948-adec-4d81-9f8c-0d55f81f63c7", "currency": "U", "total_balance": "18031.00000000", "available_balance": "18021.00000000", "reserved_balance": "10.00000000", "status": "active", "version": "22", "date_updated": "2026-09-21T11:45:09.515Z" } ]
  2. Execution of Flow 2 (Second Flow - Triggered after Flow 1 completes) Operation: Update Data (update_wallets) Collection: wallet_accounts Emit Events: Enabled DB State (Expected Payload): The database record is successfully updated to version: 23: { "id": "7d37fe0e-ddba-4e11-86bf-109bf01c5412", "available_balance": "18031.00000000", "reserved_balance": "0", "version": "23" } Emitted Event Data (Actual Received Payload - BUG): Instead of broadcasting version 23, the client subscribed to wallet_accounts receives the stale payload from Flow 1 (version 22) [2026-09-21T11:45:55.677Z] UPDATE RECEIVED [ { "id": "7d37fe0e-ddba-4e11-86bf-109bf01c5412", "user_id": "fdc0d948-adec-4d81-9f8c-0d55f81f63c7", "currency": "U", "total_balance": "18031.00000000", "available_balance": "18021.00000000", "reserved_balance": "10.00000000", "status": "active", "version": "22", "date_updated": "2026-09-21T11:45:09.515Z" } ]

Questions / Expected Behavior Expected Result: The emitted event for Flow 2 should contain the newly updated data (version 23). Is this caused by internal event payload caching or uncommitted database transaction states during the execution of the update operation in Flows? How can I ensure emitted events always reflect the latest DB state across multiple flow executions?

Thanks, ThachNguyen

Flow1 operation setting:

Image

Flow2 operation setting:

Image

Directus Version

v12.2.0

Hosting Strategy

Self-Hosted (Custom)

Database

PostgreSQL