Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

agentcore.json "protocol": "HTTP" is silently dropped — runtime deploys with protocolConfiguration unset, and HTTP cannot be set explicitly

Aperta
#2,059 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
aws, typescript
Ambito
cloud

Direzione di ricerca

Inizia da dist/cdk/constructs/components/primitives/runtime/AgentCoreRuntime.js, intorno alle righe 246-261, e traccia il percorso con cui i valori di protocol di agentcore.json arrivano a CfnRuntime. Verifica la rappresentazione distribuita per un protocollo HTTP dichiarato esplicitamente, quindi controlla la descrizione dello schema per protocol. Il lavoro è completato quando HTTP viene inoltrato esplicitamente oppure l'omissione intenzionale è documentata chiaramente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Summary

Declaring "protocol": "HTTP" on a runtime in agentcore.json is accepted by the schema but silently never applied: the CDK construct only forwards protocolConfiguration to the L1 CfnRuntime when the declared protocol is not HTTP. The deployed runtime ends up with protocolConfiguration unset, and there is no way to explicitly assert HTTP on the deployed resource.

Where

@aws/agentcore-cdk 0.1.0-alpha.48 (also verified on alpha.45), dist/cdk/constructs/components/primitives/runtime/AgentCoreRuntime.js:

const protocolMode = agent.protocol ?? 'HTTP';            // line 246
...
// CfnRuntime.protocolConfiguration is typed as `string | undefined` in the L1,
// so passing 'MCP', 'A2A', or 'AGUI' directly is correct per the CloudFormation spec.
...(protocolMode !== 'HTTP' && { protocolConfiguration: protocolMode }),   // line 261

So 'MCP', 'A2A', and 'AGUI' pass through, but a user-declared 'HTTP' is indistinguishable from not declaring anything.

Why it matters
  1. Least surprise: a value the user explicitly wrote into agentcore.json is dropped with no warning. agentcore status / the deployed runtime then show no protocol configuration, which reads as "not configured" rather than "configured as HTTP".
  2. It blocks controlled experiments. We were investigating an idle-session-reaping/billing problem where one hypothesis (from a colleague's test) was that the presence or absence of protocolConfiguration on the runtime affected idle-session reaping. There was no declarative way to deploy the "explicitly HTTP" arm — the construct makes that state unreachable. (For the record, our controlled experiment showed reaping works fine with protocolConfiguration unset once the agent's /ping stops re-stamping time_of_last_update; the hypothesis was a confound. But we had to establish the deployed state by inspecting the construct source rather than by declaring it.)
Expected behaviour (either is fine)
  • Pass the declared protocol through unconditionally — if CreateAgentRuntime/CloudFormation accepts HTTP as an explicit serverProtocol, declaring it should set it; or
  • If HTTP is deliberately omitted because unset means HTTP service-side, document that in the agentcore.json schema description for protocol (and ideally have the CLI note it at deploy/diff time) so a declared HTTP isn't mistaken for a deploy bug.
Environment
  • @aws/agentcore CLI 0.27.0 (which pins the construct; also reproduced reading alpha.48 from npm)
  • @aws/agentcore-cdk 0.1.0-alpha.45 and 0.1.0-alpha.48
  • Runtime deploys verified in eu-west-2

🤖 Generated with Claude Code

https://claude.ai/code/session_01CiwESpXfsVS2dBrSnMosei

Lingua principale
TypeScript
Stelle
291
Fork
96
Merge medio
17h 29m
PR unite (30g)
193

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di aws/agentcore-cli

Tutte le issue di aws/agentcore-cli

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.