You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Connect an agent in one flow: versions first, one approval, watcher included - #875
His CLI was 0.11.0, which has neither auth agent connect nor connect.
His plugin was 0.7.2, so the legacy basecamp-connect skill was removed before the new one existed.
He had to approve twice: Basecamp's instructions page connected over HTTP into ~/.basecamp-agent/credentials.json, which the CLI can't read, so auth agent connect connected a second time.
The watcher came as a separate step.
bc3#13784 makes the instructions page CLI-first, and this PR makes the CLI side match it.
basecamp-connect skill
Before anything: require CLI 0.13.0 or later, running basecamp upgrade when it's older. Remove the legacy skill: symlinks are deleted, a real directory only after asking. Removing it here is safe because the skill doing the removing is installed.
First-time setup:
On a computer with no profiles, auth status answers "no profiles are configured". The skill now treats that as a free profile, and never runs profile create for an agent, since that signs in a person.
If the instructions page left a ~/.basecamp-agent/credentials.json, the skill says before connecting that connecting replaces it, so the person approves once more.
--operator <id> is named for non-personal agents.
New step 5: start the connector right after setup.
Doctor and the post-upgrade notice
A plugin/CLI mismatch now names the side to move:
plugin behind: claude plugin update basecamp-cli@37signals, then restart Claude Code;
CLI behind: basecamp upgrade;
plugin still under the old basecamp@37signals key, which the notice used to miss entirely: basecamp setup claude.
Versions that are equal by semver (v0.13.0, 0.13.0) no longer count as a mismatch.
README
New section "Connecting an agent to this computer": the version it needs, basecamp connect setup and its scriptable steps, connecting once, and updating the plugin (then restarting) before removing an older skill.
Review
Two rounds of adversarial review, by separate Opus agents. One change came out of it: importing the old credentials file (piped jq into auth login --with-client-credentials) was tried and dropped. It broke on read-only agents, a missing jq and stale files, and it contradicted the skill's own credential rules.
Verification
New harness tests for the mismatch hint and PluginUpdateNotice: legacy key, plugin behind, semver-equal, dev build. Each failed against a stub of the old behavior before the change.
bin/ci is green locally, including skill drift.
Not run: the connect skill evals (make -C skill-evals eval-connect).
Not in this PR
The Codex version check still says basecamp setup codex in both directions.
The "no profiles are configured" error still points at basecamp profile create.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The migration ordering can still trigger duplicate approval, semantic version equality is mishandled, and watcher behavior is inaccurately documented and insufficiently tested.
Aligns agent connection guidance with a single-approval setup flow and improves plugin/CLI mismatch remediation.
Changes:
Adds credential migration, version checks, and automatic watcher startup guidance.
Documents agent connection setup.
Provides directional plugin/CLI upgrade hints with tests.
[!TIP]
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Setup messaging incorrectly implies the watcher starts automatically
README.md:251
“One command does it all” implies that this invocation also starts the watcher, but guided setup explicitly finishes with Running: no and only prints instructions for starting it. Scope this sentence to connecting and configuring the agent so users do not expect the connector to be running afterward.
This helper drops the repository's supported top-level array schema. For an entry such as [{"name":"basecamp@37signals","version":"0.7.2"}], installedPluginVersion intentionally rejects the legacy key and this function cannot parse the array, so PluginUpdateNotice remains empty—the exact legacy install this change intends to catch. Handle name/package/id array entries here as the existing plugin parsers do, and add a regression case.
Step 4 omits the selected operator ID
skills/basecamp-connect/SKILL.md:226
The new person-ID operator path is not carried into step 4: that command-building instruction only says to add --operator-profile. Following this branch therefore runs setup without --operator <id>; for an ownerless agent setup will refuse it, and for a personal agent it can silently select the owner instead. Add --operator to step 4's list of flags to include “as chosen.”
…ncluded
From a migration report: a CLI too old for `auth agent connect`, a plugin
too old for basecamp-connect, a second approval because the CLI couldn't
use the connection Basecamp's instructions page had made over HTTP, and the
watcher arriving as a separate step.
- basecamp-connect skill: check CLI 0.13.0+ (basecamp upgrade) and remove
the legacy skill before anything; treat "no profiles are configured" as a
free profile and never `profile create` for an agent; import a
~/.basecamp-agent/credentials.json connection instead of replacing it;
name --operator for non-personal agents; start the connector right after
setup.
- doctor and the post-upgrade notice: a plugin/CLI mismatch now says which
side to bring forward: `claude plugin update basecamp-cli@37signals` and
a restart when the plugin is behind, `basecamp upgrade` when the CLI is.
- README: how to connect an agent, the version it needs, connecting once,
and updating the plugin before removing an older skill.
From the adversarial review:
- The post-upgrade notice read only the basecamp-cli key, so a plugin old
enough to lack basecamp-connect (installed as basecamp@37signals) got no
notice. PluginUpdateNotice reads the old key too and says `basecamp setup
claude`, which reinstalls it under the new name. Versions equal by semver
("v0.13.0", "0.13.0") no longer count as a mismatch, here or in doctor.
- The skill no longer imports ~/.basecamp-agent/credentials.json: piped jq
broke on read-only agents, a missing jq or a stale file, and it broke the
skill's own credential rules. It warns that connecting replaces that
connection, in the same branch that connects.
- Legacy skill removal deletes symlinks only, and asks before a real
directory. The 0.13.0 floor says why.
- README: guided setup ends by saying how to start the connector (it
doesn't start it), and an old-name plugin updates through setup claude.
… agent
From the convergence review: guided setup picks its own profile name, so
for an agent already connected under another one it could connect again.
Also corrects the version the connect skill arrived in.
Review fixes for the connect-one-flow change.
The post-upgrade notice read the old basecamp@37signals key only when the
current key was absent and its version differed, and only in the map
formats of installed_plugins.json. A legacy copy at the CLI's version, one
installed beside the current key, or one in the array format got no
notice. It is now named first, on presence, in every format: setup is the
remedy in each case. The legacy lookup reuses installedPluginVersion's
parser, parameterized by key, instead of a second one.
The connect skill:
- Invocation routes "no profiles are configured" (what connect show says
on a computer with none) to First-time setup, not to that error's
profile-create hint.
- Step 4 carries --operator, which step 2 offers for an operator without
a profile here.
- A profile name starts with a letter or digit, as the CLI requires.
The first-time-setup eval asked for the agent running and then required
a reply saying running wasn't available yet, a leftover from before the
connector existed. It now expects `basecamp connect -P helper` after
setup instead.
The reason will be displayed to describe this comment to others. Learn more.
All reported issues were addressed across 4 files (changes from recent commits).
You’re at about 99% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.
Reply with feedback, questions, or to request a fix.
Sanitize plugin version before displaying in terminal notice
internal/harness/claude.go:306
installed_plugins.json is explicitly treated as non-first-party input elsewhere (internal/commands/wizard_agents.go:615-617), but its version is interpolated into this one-line terminal notice unchanged. A value containing \n, ESC, or C1 controls can inject lines or terminal sequences when root.go prints the result. Sanitize the displayed plugin version with richtext.SanitizeSingleLine in both notice branches, while retaining the raw value for semver comparison.
…below exports
The first-time-setup eval matched any `connect setup` before the
connector start, so a trace that started the connector between a refused
setup (the mock refuses one without --serve) and the one that succeeds
passed. The step now matches the successful invocation.
normalizeSemver sat between two exported functions; it moves below the
private helpers it sits beside, per STYLE.md's export order.
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
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.
Companion to basecamp/bc3#13784, from Adrien's migration report on Bring your agents to Basecamp.
His setup hit four rough edges:
auth agent connectnorconnect.basecamp-connectskill was removed before the new one existed.~/.basecamp-agent/credentials.json, which the CLI can't read, soauth agent connectconnected a second time.bc3#13784 makes the instructions page CLI-first, and this PR makes the CLI side match it.
basecamp-connectskillbasecamp upgradewhen it's older. Remove the legacy skill: symlinks are deleted, a real directory only after asking. Removing it here is safe because the skill doing the removing is installed.auth statusanswers "no profiles are configured". The skill now treats that as a free profile, and never runsprofile createfor an agent, since that signs in a person.~/.basecamp-agent/credentials.json, the skill says before connecting that connecting replaces it, so the person approves once more.--operator <id>is named for non-personal agents.Doctor and the post-upgrade notice
claude plugin update basecamp-cli@37signals, then restart Claude Code;basecamp upgrade;basecamp@37signalskey, which the notice used to miss entirely:basecamp setup claude.v0.13.0,0.13.0) no longer count as a mismatch.README
basecamp connect setupand its scriptable steps, connecting once, and updating the plugin (then restarting) before removing an older skill.Review
Two rounds of adversarial review, by separate Opus agents. One change came out of it: importing the old credentials file (piped
jqintoauth login --with-client-credentials) was tried and dropped. It broke on read-only agents, a missingjqand stale files, and it contradicted the skill's own credential rules.Verification
PluginUpdateNotice: legacy key, plugin behind, semver-equal, dev build. Each failed against a stub of the old behavior before the change.bin/ciis green locally, including skill drift.make -C skill-evals eval-connect).Not in this PR
basecamp setup codexin both directions.basecamp profile create.