fix: read accounts with stackone_get_accounts and reconnect with a repair tool in the connection skill (ENG-3937)

KE
7h ago
+15-12

The stackone-connection skill now reads accounts with stackone_get_accounts and reconnects a broken account with a repair tool when the session has one.

  • Account reads: stackone_list_linked_accounts and stackone_get_account are replaced by stackone_get_accounts, with connector_key to list and id for one account, plus expand: "connector,connector_profile". The real tool name is checked at unified-cloud-api origin/develop 7a7fd3045.
  • Profile lookup: the account's connector_profile_id names the profile, so the skill no longer matches a profile by name.
  • Repair tool: if the session has a tool that reconnects an account by id (the mock has stackone_relink_account), the skill uses it on the broken account. The same account comes back.
  • Fallback: without such a tool, the skill links through the account's own profile with stackone_link_account. The real tool sends multiple: true, so this adds a new account beside the broken one. Staging and production have no repair tool today, so this is the path they take.
  • Old account: the skill still never deletes the broken account, and its Finish section already has the agent report what it did not do.
  • Ticket: ENG-3937

Testing

Agent runs used Haiku 5.5 on Bedrock against the mock MCP at stackone-agent develop 1ee934f8, 10 connection scenarios with 5 runs each, measured at commit 1723abb.

SetupScore (of 50)
Without the skill36
With the skill, before 1723abb35
With the skill at 1723abb38
  • Reconnect scenarios: all 10 runs of the two reconnect scenarios used the repair tool and none called stackone_link_account.
  • Not benchmarked: commit 7819fbf, which only rewrites the fallback text. The mock always has the repair tool, so no run reaches that text.
  • Not tested: a live run on a session without a repair tool.
  • CI: scripts/check-manifests.py passes. No check reads skill text.

Risks

  • Fallback duplicates: on a session without a repair tool, a reconnect leaves two accounts until the user removes the broken one.
  • Rollback: revert this PR. Nothing deploys from this repo on merge.

🤖 Generated with Claude Code


Summary by cubic

The stackone-connection skill now reads accounts with stackone_get_accounts and reconnects a broken account through a repair tool when the session has one.

  • Replaces stackone_list_linked_accounts and stackone_get_account, which the management MCP doesn't expose, and reads the account's connector_profile_id rather than matching a profile by name. When that id is null, it picks the profile as in "Pick the profile deliberately" above.
  • With a repair tool such as stackone_relink_account present, it reconnects the broken account itself; without one, it falls back to a fresh link through the account's own profile, which adds a new account and leaves the broken one until the user removes it.

Testing

10 connection scenarios × 5 runs on Bedrock Haiku 5.5 against the mock scored 38 of 50 at this commit, up from 35 before; all reconnect runs used the repair tool. CI passes.