fix: align harness memory config with Smithy API model#1288
Merged
Conversation
The harness API expects memory as a union type:
{ agentCoreMemoryConfiguration: { arn: "..." } }
but the CLI was sending the wrong structure:
{ memoryArn: "..." }
This caused the API to silently accept the request but store an empty
memory config, resulting in deployed harnesses having no memory
capabilities at invocation time.
Contributor
Coverage Report
|
agentcore-cli-automation
approved these changes
May 18, 2026
agentcore-cli-automation
left a comment
There was a problem hiding this comment.
Reviewed the PR — looks good to merge.
The fix correctly aligns the wire format with the Smithy union ({ agentCoreMemoryConfiguration: { arn } }). All call sites have been updated:
HarnessMemoryConfigurationinterface inagentcore-harness.tsreflects the new shape.harness-mapper.tsbuilds the nested structure and now also plumbsmemory.actorId(previously ignored).harness-deployer.tscorrectly extracts the ARN from the new path formemoryArnin deployed state.UpdateHarnesssemantics with{ optionalValue: null }to clear memory continue to work.
Existing throw-on-unresolved behavior for memory.name is preserved, and the new gateway-tool tests around the mapTools cast removal are a nice coverage bump.
Minor (non-blocking) suggestion: consider adding a unit test for the actorId plumbing in mapMemory so a future refactor doesn't silently drop it again — currently no test covers that branch.
The Smithy model includes strategyId in the retrieval config structure but it was missing from the TypeScript interface.
notgitika
reviewed
May 18, 2026
notgitika
approved these changes
May 18, 2026
notgitika
left a comment
Contributor
There was a problem hiding this comment.
LGTM thank you for fixing this!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
harness.json{ agentCoreMemoryConfiguration: { arn: "..." } }but the CLI was sending{ memoryArn: "..." }"memory": {}, resulting in deployed harnesses having no memory capabilitiesCloses #1291
Changes
src/cli/aws/agentcore-harness.ts: UpdatedHarnessMemoryConfigurationinterface to match Smithy model withagentCoreMemoryConfigurationunion wrappersrc/cli/operations/deploy/imperative/deployers/harness-mapper.ts: UpdatedmapMemory()to return correct nested structuresrc/cli/operations/deploy/imperative/deployers/harness-deployer.ts: Updated ARN extraction from new structureTest plan
npm test -- "harness-mapper"— 38 tests passnpm test -- "harness-deployer"— 22 tests passnpm test -- "agentcore-harness"— 16 tests passnpx tsc --noEmit— no type errorsGetHarnessreturns{ agentCoreMemoryConfiguration: { arn: "..." } }instead of{}