Skip to content

fix(studio): connectors and GitHub reach every agent run, Edit with AI button - #1206

Merged
LinuxDevil merged 3 commits into
mainfrom
fix/studio-connectors-reach-agents
Nov 18, 2026
Merged

LinuxDevil merged 3 commits into
mainfrom
fix/studio-connectors-reach-agents

Conversation

@LinuxDevil

Copy link
Copy Markdown
Owner

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 and git push failed.

  • Every run adds the tools of each fully connected connector the spec does not already declare, behind tool search. Write tools ask for approval.
  • Every run with GitHub connected gets account-level tools: github_list_my_repositories, github_create_repository and github_api (creating and non-GET calls ask first).
  • The shell gets connector secrets in its env, and HTTPS pushes to github.com authenticate with the connected token.
  • The Author's per-turn context lists connected accounts with the integration ref that uses their saved secrets (names only, never values).
  • The agent header has an "Edit with AI" button; the duplicate overflow-menu entry is gone.

🤖 Generated with Claude Code

LinuxDevil and others added 2 commits November 18, 2026 16:05
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>

@lousho-ai lousho-ai Bot 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.

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔴 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>

@lousho-ai lousho-ai Bot 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.

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.

@LinuxDevil
LinuxDevil merged commit 36a751d into main Nov 18, 2026
6 checks passed
@LinuxDevil
LinuxDevil deleted the fix/studio-connectors-reach-agents branch November 18, 2026 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant