Skip to content

fix(create): make --defaults create a harness project#1644

Merged
aidandaly24 merged 1 commit into
mainfrom
fix/defaults-flag-harness
Jun 25, 2026
Merged

fix(create): make --defaults create a harness project#1644
aidandaly24 merged 1 commit into
mainfrom
fix/defaults-flag-harness

Conversation

@aidandaly24

Copy link
Copy Markdown
Contributor

Description

Harness is now the default for agentcore create, so --defaults no longer creates a Python/Strands/Bedrock agent — it produces a harness project, identical to passing no routing flags.

This PR makes the code and docs reflect that:

  • command.tsx — drop the agent-default backfill block that ran when --defaults was combined with an agent-path flag (e.g. --defaults --framework Strands). The flag is now purely "create with default (harness) settings." Update the help text from "Use defaults (Python, Strands, Bedrock, no memory)" to "Create a harness project with default settings (this is the default)."
  • Docs — every --defaults usage is corrected:
    • Standalone harness quick-starts drop the flag (harness is implicit) and add an explicit agent example where useful (docs/commands.md).
    • Agent-oriented flows (gateway.md, knowledge-bases.md, payments.md, config-bundles.md, recommendations.md) now use the explicit --framework Strands --model-provider Bedrock agent path. This also fixes the two --defaults --with-config-bundle examples, which were silently broken — the harness path ignores --with-config-bundle, so they previously produced a harness with no bundle.
  • Tests — strengthen the --defaults unit test to assert the harness contract (harnessName + app/<name>/harness.json) so the routing can't silently regress.

Related Issue

Closes #

Documentation PR

N/A — docs in this repo are updated in-line.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Other (please describe):

Testing

How have you tested the change?

  • I ran npm run test:unit and npm run test:integ (ran the affected create unit + create-edge-cases integ suites — all pass)
  • I ran npm run typecheck
  • I ran npm run lint
  • If I modified src/assets/, I ran npm run test:update-snapshots and committed the updated snapshots (no asset changes)

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Harness is now the default for `agentcore create`, so `--defaults` no
longer creates a Python/Strands/Bedrock agent. Drop the agent-default
backfill that ran when `--defaults` was combined with an agent-path flag,
so the flag is purely "create with default (harness) settings" and behaves
identically to passing no routing flags at all.

Update the `--defaults` help text and every doc usage to match: standalone
quick-starts drop the flag (harness is implicit) and agent-oriented flows
(gateway, knowledge bases, payments, config bundles, recommendations) use
the explicit `--framework Strands --model-provider Bedrock` agent path.

Strengthen the `--defaults` unit test to assert the harness contract
(`harnessName` + `app/<name>/harness.json`) so the routing can't silently
regress.
@aidandaly24 aidandaly24 requested a review from a team June 25, 2026 22:01
@github-actions github-actions Bot added the size/s PR size: S label Jun 25, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label Jun 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Package Tarball

aws-agentcore-0.21.0.tgz

How to install

gh release download pr-1644-tarball --repo aws/agentcore-cli --pattern "*.tgz" --dir /tmp/pr-tarball
npm install -g /tmp/pr-tarball/aws-agentcore-0.21.0.tgz

@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Jun 25, 2026
@github-actions github-actions Bot added the agentcore-harness-reviewing AgentCore Harness review in progress label Jun 25, 2026

@agentcore-cli-automation agentcore-cli-automation left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to merge.

This is a focused, well-scoped change:

  • Removing the agent-default backfill correctly reflects the new harness-default semantics for agentcore create. --defaults is now purely "create with default (harness) settings," matching the no-flags path.
  • All doc updates are correct: agent-oriented flows (gateway, KB, payments, config bundles, recommendations) now use the explicit --framework Strands --model-provider Bedrock agent path, which also fixes the previously-broken --defaults --with-config-bundle examples (harness path silently ignored --with-config-bundle).
  • The strengthened unit test asserts the harness contract (harnessName + app/<name>/harness.json) so the routing can't silently regress.
  • Telemetry is unaffected — both the harness path (withCommandRunTelemetry) and agent path (runCliCommand) instrument as before.

One minor behavioral note (not blocking): mixing --defaults with a single agent-path flag like --framework Strands now triggers the standard "provide all: --framework, --model-provider, --memory" validation error instead of being backfilled. This is the intended behavior per the PR description, and the resulting error is clear enough to guide users.

@github-actions github-actions Bot removed the agentcore-harness-reviewing AgentCore Harness review in progress label Jun 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 37.42% 13771 / 36794
🔵 Statements 36.7% 14646 / 39904
🔵 Functions 32% 2356 / 7362
🔵 Branches 31.48% 9180 / 29161
Generated in workflow #3850 for commit 8bc1bd6 by the Vitest Coverage Report Action

@aidandaly24 aidandaly24 merged commit eb2cc23 into main Jun 25, 2026
34 checks passed
@aidandaly24 aidandaly24 deleted the fix/defaults-flag-harness branch June 25, 2026 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/s PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants