Skip to content

[BUG] Workflow components not persisting - only START block saved #3427

@Ramksai07

Description

@Ramksai07

Workflow components (Agent, Tool, Condition, etc.) added to the visual editor are not persisted to the database. Only the START block is saved. When navigating away from a workflow or clicking Deploy, all added components are lost.

To Reproduce

Steps to reproduce the behavior:

  1. Go to the workflow editor (create new workflow or open existing)
  2. Click on 'Add Agent' or drag an Agent block to the canvas
  3. Click on 'Add Tool' or drag a Tool block to the canvas
  4. Connect the blocks with edges
  5. Click deploy, Only the START block remains, all other components are gone
  6. Navigate to another workflow
  7. Navigate back to the original workflow
  8. See error: Only the START block remains, all other components are gone

Same steps worked in simai cloud

Expected behavior

All components added to the workflow canvas should be persisted to the database. When navigating back to the workflow, all components (START, Agent, Tool, etc.) and their connections should be visible and functional.

Screenshots

Image Image Image Image

Network request showing only START block in save payload:

PUT /api/workflows/{id}/state
{
  "blocks": {
    "start-block-id": { "type": "start_trigger", ... }
    // Agent and Tool blocks missing despite being visible in UI
  },
  "edges": [],  // Connections missing
  "lastSaved": 1772742617916
}

Database query showing only START block persisted:

SELECT id, type, name FROM workflow_blocks WHERE workflow_id = 'xxx';
-- Result: Only 1 row (START block)
-- Expected: 3 rows (START, Agent, Tool)

Additional context

Environment:

  • Deployment: Self-hosted Kubernetes
  • Image: ghcr.io/simstudioai/simstudio:latest
  • Database: PostgreSQL 16 with pgvector
  • Browser: Chrome 145, Firefox 133, Safari 17 (all exhibit same issue)
  • Tested in incognito mode with cache cleared

Technical Analysis:

The issue appears to be in the frontend state management. Components are rendered visually in the canvas but are not added to the workflow state object that gets serialized and sent to the backend.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions