Skip to content

fix: propagate headers to local subagents - #124

Open
Akatuoro wants to merge 2 commits into
mainfrom
fix/local-subagent-headers
Open

Akatuoro wants to merge 2 commits into
mainfrom
fix/local-subagent-headers

Conversation

@Akatuoro

Copy link
Copy Markdown
Contributor

Fixes #121

Have you...

  • Added relevant entry to the change log?

@Akatuoro
Akatuoro requested review from a team as code owners September 15, 2026 06:34
@hyperspace-pr-bot

Copy link
Copy Markdown

Summary

The following content is AI-generated and provides a summary of the pull request:


Preserve authentication headers across local sub-agent calls

Category: Bug Fix 🐛

Summary

This PR fixes JWT/header propagation when an A2A agent invokes a local sub-agent, which then calls MCP tools or destination-backed services. Previously, spawned local sub-agent contexts did not retain request headers, causing downstream destination resolution and MCP calls to lose the user JWT and fail authorization.

Changes

  • Pass cds.context.headers into local sub-agent cds.spawn(...) calls so spawned execution contexts preserve incoming request headers.
  • Update Cloud SDK JWT retrieval in MCP and sub-agent destination handling to fall back to cds.context when cds.context.http.req is unavailable.
  • Add a changelog entry for the header propagation fix.

Impact

JWTs can now flow from the main A2A service through local sub-agents and into destination-backed MCP tool invocations, supporting authenticated multi-agent setups deployed within a single CAP project.

Have you...

  • Added relevant entry to the change log?

Fixes #121
Related issue: #121


  • 🔄 Regenerate and Update Summary
  • ✏️ Insert as PR Description (deletes this comment)
  • 🗑️ Delete comment
PR Bot Information

Version: 1.31.30

@Akatuoro Akatuoro changed the title propagate headers to local subagents fix: propagate headers to local subagents Sep 15, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[0.9.4: ] JWT gets lost in a setup of A2A orchestrator -> A2A Sub agents -> MCP server

1 participant