Description
There is no way to edit a harness's configuration after the initial agentcore add harness flow. If a user needs to change the system prompt, swap a model, add/remove tools, or fix a misconfigured gateway tool, they have no CLI-native path to do so.
This is especially painful for gateway tools within a harness. When a gateway is added during harness creation, the ARN and auth config are written to app/<harnessName>/harness.json — a file users don't know exists. If the gateway ARN or OAuth config is wrong, deployments fail with no discoverable way to fix it from the CLI.
Current Behavior
HarnessPrimitive only implements add() and remove(). All harness configuration is written once during add():
- Harness spec →
app/<harnessName>/harness.json (via configIO.writeHarnessSpec())
- System prompt →
app/<harnessName>/system-prompt.md
- Project reference →
agentcore/agentcore.json
Properties that cannot be changed after creation:
- System prompt
- Model provider / model ID
- Tools (browser, code_interpreter, MCP servers, gateway ARN + auth config)
- Max iterations, max tokens, timeout
- Truncation strategy
- Network mode, subnets, security groups
- Container URI / Dockerfile path
- Authentication configuration
The only workarounds are:
- Manually edit
app/<harnessName>/harness.json (undiscoverable)
agentcore remove harness + agentcore add harness (destructive — loses customizations)
Expected Behavior
Users should be able to edit harness configuration after creation. For example:
agentcore edit harness
agentcore edit harness --name <harness-name>
This could re-enter the wizard with current values as defaults, or open the config in an editor, or support targeted flag-based edits — whatever fits the CLI's UX patterns best.
Relevant Code
- Harness spec written (once):
src/cli/primitives/HarnessPrimitive.ts line ~177
- System prompt written (once):
src/cli/primitives/HarnessPrimitive.ts lines ~178-183
- Gateway tool config built during add:
src/cli/primitives/HarnessPrimitive.ts lines 110-138
- Harness spec file path:
app/<harnessName>/harness.json (via PathResolver.getHarnessConfigPath())
- Tools passed to API unchanged on deploy:
src/cli/operations/deploy/imperative/deployers/harness-mapper.ts lines 248-254
- No
update() or edit() method on HarnessPrimitive or BasePrimitive
Impact
Harness iteration is a core development workflow. Users frequently need to tweak system prompts, swap models, fix gateway ARNs, or add/remove tools. Currently, any mistake during initial creation forces users out of the CLI workflow — either manually editing files they don't know about, or destroying and recreating the entire harness.
Description
There is no way to edit a harness's configuration after the initial
agentcore add harnessflow. If a user needs to change the system prompt, swap a model, add/remove tools, or fix a misconfigured gateway tool, they have no CLI-native path to do so.This is especially painful for gateway tools within a harness. When a gateway is added during harness creation, the ARN and auth config are written to
app/<harnessName>/harness.json— a file users don't know exists. If the gateway ARN or OAuth config is wrong, deployments fail with no discoverable way to fix it from the CLI.Current Behavior
HarnessPrimitiveonly implementsadd()andremove(). All harness configuration is written once duringadd():app/<harnessName>/harness.json(viaconfigIO.writeHarnessSpec())app/<harnessName>/system-prompt.mdagentcore/agentcore.jsonProperties that cannot be changed after creation:
The only workarounds are:
app/<harnessName>/harness.json(undiscoverable)agentcore remove harness+agentcore add harness(destructive — loses customizations)Expected Behavior
Users should be able to edit harness configuration after creation. For example:
This could re-enter the wizard with current values as defaults, or open the config in an editor, or support targeted flag-based edits — whatever fits the CLI's UX patterns best.
Relevant Code
src/cli/primitives/HarnessPrimitive.tsline ~177src/cli/primitives/HarnessPrimitive.tslines ~178-183src/cli/primitives/HarnessPrimitive.tslines 110-138app/<harnessName>/harness.json(viaPathResolver.getHarnessConfigPath())src/cli/operations/deploy/imperative/deployers/harness-mapper.tslines 248-254update()oredit()method onHarnessPrimitiveorBasePrimitiveImpact
Harness iteration is a core development workflow. Users frequently need to tweak system prompts, swap models, fix gateway ARNs, or add/remove tools. Currently, any mistake during initial creation forces users out of the CLI workflow — either manually editing files they don't know about, or destroying and recreating the entire harness.