Skip to content
This repository was archived by the owner on Aug 22, 2025. It is now read-only.
This repository was archived by the owner on Aug 22, 2025. It is now read-only.

cf.task creating Prefect task but inputs not logged #405

@mattijsdp

Description

@mattijsdp

Description

When creating a task with the task decorator and calling that task inside a flow, if Prefect is configured correctly then this will create a Prefect flow and task. The inputs to the task in question though are not logged correctly. On the task page under task inputs for the example below it simply gives:

{
  "topic": []
}

Whereas I would expect:

{
  "topic": "roses"
}

Example Code

# In the terminal run:
# `prefect server start`
# `prefect config set PREFECT_API_URL=http://127.0.0.1:4200/api`
import controlflow as cf


@cf.task()
def write_poem(topic: str) -> str:
    """Write a poem about the topic"""

@cf.flow
def demo_flow():
    return write_poem(topic="roses")

if __name__ == "__main__":
    result = demo_flow()

Version Information

ControlFlow version: 0.12.0
Prefect version: 3.1.14
LangChain Core version: 0.3.31
Python version: 3.11.11
Platform: macOS-15.2-arm64-arm-64bit

Additional Context

No response

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