Skip to content

[BUG] Custom headers are not passed along by agentcore invoke in dev mode #488

Description

@timle8n1

Describe the bug
When running agentcore invoke with the --dev flag, headers are not passed along to the dev mode server. Is there a reason for this?

To Reproduce
Steps to reproduce the behavior:
Create an agent and try to load in a custom header

req_headers = getattr(context, 'request_headers', None) or {}
custom_value = req_headers.get("x-amzn-bedrock-agentcore-runtime-custom-value")

Start the agent in development mode

uv run agentcore dev

Invoke the agent in dev mode

uv run agentcore invoke --dev "Do something useful" --headers "value:awesome"

Expected behavior
custom_value should have the value awesome

Error Output
custom_value is empty

Additional context
Example fix here: https://github.com/gopangea/bedrock-agentcore-starter-toolkit/tree/tl-allow-custom-headers-in-dev-mode

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