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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR description correctly calls out that this is only safe once
add harnessis ungated, but the change as written doesn't enforce that — the message renders the same regardless of__PREVIEW__. Today onmain:src/cli/primitives/registry.ts:26—harnessPrimitive = isPreviewEnabled() ? new HarnessPrimitive() : undefinedsrc/cli/cli.ts:131-132only registers commands for primitives inALL_PRIMITIVES, soadd harnessis not registered in GA builds.github/workflows/release.ymlrunsnpm run build(GA,__PREVIEW__ = false) when releasing frommainto npmlatestSo if this PR merges to
mainand alatestrelease happens before harness is ungated, GA users will land on the existing-project-error screen, follow the instruction to runagentcore add harness, and hiterror: 'harness' is not a valid subcommand.A few ways to address:
isPreviewEnabled()— show the new harness-first wording only in preview builds, keep the existing "Use add agent…" wording in GA. When the harness ungating PR lands and removesisPreviewEnabled()fromregistry.ts, it can also remove this branch and leave just the new message. Most defensive option, makes this PR independently safe to merge.latestbuild never goes out with this message but withoutadd harnessregistered.harnessPrimitiveis defined (e.g. importharnessPrimitiveand conditionally render the harness line). Same effect as option 1 but keyed off the actual registration rather than the build flag.Option 1 or 3 would let this land independently of release sequencing.