Repository navigation
fix(studio): connectors and GitHub reach every agent run, Edit with AI button - #1206
Conversation
Connecting an account in Profile > Connectors only stored its secrets, so agents never saw them: no integration tools unless the spec declared one, and the shell had no GITHUB_TOKEN, so git push and repo creation failed. Each run now adds the tools of every fully connected connector the spec does not already declare, deferred behind tool search, with write tools asking for approval. The shell gets the connector secrets in its env, and GitHub pushes over HTTPS authenticate with the connected token. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…h AI button GitHub's integration tools are pinned to one owner/repo, so a connected token gave agents nothing. Every run now also gets account-level GitHub tools (list my repositories, create a repository, any REST call) behind tool search; creating a repo and non-GET calls ask for approval. The Author's per-turn context lists each connected account with the integration ref that uses its saved secrets, so it can add them to an agent. The agent header gets a visible "Edit with AI" button that opens the Author on that agent; the duplicate overflow-menu entry is gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Requesting changes. The PR introduces important connector and GitHub integration features, but there is a definite bug in buildAgentV2.ts that will cause the GitHub tools to be lost.
Verdict: Requesting changes.
Main risk: In buildAgentV2.ts at the line Object.assign(tools, githubAccountTools(githubToken), tools), the second tools argument overwrites the GitHub account tools that were just merged. The correct call should be Object.assign(tools, githubAccountTools(githubToken)) — passing the target once merges the GitHub tools into the existing spec tools without erasing them.
What the PR does: It makes connector secrets usable on every agent run, adds GitHub account‑level tools (github_list_my_repositories, github_create_repository, github_api), gives the shell connector env for git push auth, lists connected accounts in the author's context, and replaces the duplicate "Change with AI" overflow entry with an "Edit with AI" button.
Follow‑up: The Object.assign fix is the only blocking issue; everything else appears correctly implemented and the test suite covers the new functions.
| const spec = connected.spec; | ||
| const approvals = scopedApprovalStore(deps.approvalStore, agentId); | ||
| const autoApprover = | ||
| deps.settings !== undefined && deps.spend !== undefined |
There was a problem hiding this comment.
🔴 Correctness: Object.assign(tools, githubAccountTools(githubToken), tools) overwrites the GitHub tools with the original tools object. Remove the second tools argument so the GitHub tools are preserved: Object.assign(tools, githubAccountTools(githubToken)).
…tool Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Approving.
The PR fixes the core issue: connector secrets are now used on every agent run, GitHub account tools (github_list_my_repositories, github_create_repository, github_api) are added per run, the shell gets connector env for git push auth, connected accounts are listed in the author's context, and the "Edit with AI" button replaces the duplicate overflow-menu entry.
The only bug that existed in the original diff (Object.assign(tools, githubAccountTools(githubToken), tools) overwriting tools) is now resolved — the code uses the newly exported addMissingTools function which only adds tools whose names are not already in the spec, preserving any spec-declared tool with the same name.
The test suite provides good coverage for all new functions.
Connecting an account in Profile > Connectors only stored its secrets, so agents never used them: no integration tools unless the spec declared one, and the shell had no
GITHUB_TOKEN, so repo creation andgit pushfailed.github_list_my_repositories,github_create_repositoryandgithub_api(creating and non-GET calls ask first).🤖 Generated with Claude Code