Skip to content

bug: worker registration overwrites TaskDef.runtimeMetadata, breaking credential injection after restart #320

Description

@shaileshpadave

Every time the Python runtime starts workers it calls worker_task with overwrite_task_def=True and a TaskDef that has no runtimeMetadata. This overwrites the TaskDef the server set during agent deploy (which had the credential names on runtimeMetadata), clearing it back to []. After that the server never injects the credentials at poll time, so stored credentials never reach the tool.

Repro: store a credential with 'agentspan credentials set MY_CRED val', start the runtime, then GET /api/metadata/taskdefs/my_tool — runtimeMetadata is []. Run the agent and the tool says the credential isn't in the environment.

Confirmed by test_suite2 test_credential_lifecycle Step 4 (with-credentials run).

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