Skip to content

bug: complete token not send output #2292

@ahmedriad1

Description

@ahmedriad1

Provide environment information

System:
OS: macOS 15.5
CPU: (10) arm64 Apple M1 Pro
Memory: 199.97 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.12.0 - ~/.nvm/versions/node/v22.12.0/bin/node
npm: 10.9.0 - ~/.nvm/versions/node/v22.12.0/bin/npm
pnpm: 9.15.4 - ~/Library/pnpm/pnpm
bun: 1.2.18 - /opt/homebrew/bin/bun

Describe the bug

I'm using trigger v4 (beta) and I'm creating a wait token and completing from a python app.

import requests

response = requests.post(
  "https://api.trigger.dev/api/v1/waitpoints/tokens/{tokenId}/complete",
  headers={"Authorization": f"Bearer {token}"},
  json={"output": { "status": "approved"}}
)

and I'm waiting for it like this (in TS):

const data = await wait.forToken<ApprovalToken>(tokenId).unwrap();

The wait token succeeds, and the run completes, but data is undefined and nothing is returned as output. I even tried logging it and adding to the run metadata, but it is undefined. Also in the dashboard no output is shown for the token.

Reproduction repo

none

To reproduce

Deploy a job in DEV mode, create a wait token, complete it via api, and you won't get it's output.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions