Skip to content

fix(connectors): connector reliability: slow hosts, setup for every kind, cards that end before the call, stress fixes - #933

Merged
yaacovcorcos merged 7 commits into
mainfrom
claude/connector-reliability-20261115
Nov 15, 2026
Merged

yaacovcorcos merged 7 commits into
mainfrom
claude/connector-reliability-20261115

Conversation

@yaacovcorcos

@yaacovcorcos yaacovcorcos commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Depends on #927 and must merge after it. #927 has now merged; this branch is rebased onto main (no merge commits) and contains only its own four commits.

What Changed

Four commits.

1. The 11-13 connector stress-test fixes, ported onto #927's Extensions rework (not copied over it):

  • An installed connector that is off, removed, lost its grant, failed to start or failed in transport answers MCP discovery as an empty server, with the reason in instructions. One broken connector no longer ends an agent's turn. Tool calls and refused credentials still fail (see commits 3 and 4).
  • Hosted connectors' tools name their host. Installed rows and connector pages read host facts from the whole catalog, not Discover's six-item previews.
  • Tools that wait for a person (key cards, sign-ins) are direct-only on Codex. Card endings keep their reason (timed_out, declined, cancelled).
  • Copy/save identity guards, thread-owned drafts, multi-word registry search with a "narrow the query" note, a real start check on restart, readable env-name titles, a 30-day sweep of removed connectors' history, expandable output-only tool rows, native question publication, and discoverable connector tools for Scient Agent.
  • Kept from feat(extensions): choose agents per connector, account apps shown once, a cleaner Installed and Discover #927: every agent-tool path still checks the person's agent choice before it reveals or changes anything. Control takes one caller location (project, worktree, agent). Copy carries both the owning thread and the agent. The new name guards answer an excluded agent without naming anything it did not say.

2. The G4 fixes from the analytics run:

  • Slow hosted add. The add-time MCP handshake had a fixed 5 s. One 30 s budget (the same as the other control requests) now covers connecting, 429/503 waits and reading the reply body. Effect cancellation reaches the request. Ending the probe's session never holds up the answer. A timeout says the host may be waking up and to try once more. The Add dialog shows "Still connecting" after 4 s.
  • Real cause in analytics. Connector tool failures were all accounts. AccountsError has an optional, closed failureClass taken from the connector's own reason, so an unreachable host reports unreachable, owned by external. There is no new event and no message parsing.
  • Setup for every connector kind. scient_connector_setup refused hosted connectors, while Scient's own next-step text sent agents there. Setup now answers for every connector. One helper gives setup and every next step the same route: setup for a local connector, sign-in control for a sign-in, the person for a hosted key or Source Control account that is gone. A ready connector "needs no setup".
  • Name lookup stays exact. Adding by an inexact name returns up to 3 candidate names this agent may add, plus the scient_connector_list {query} step. It never adds a guess.
  • A key card never outlives its caller. Cards waited 10 min, but the callers dropped the call first: Antigravity at 180 s, and Scient Agent at ~5.5 min with "The operation timed out.", which turned out to be Bun's own fetch deadline (reproduction below). The Scient Agent / Oh My Pi bridge now passes timeout: false; Node ignores it, and its 65-minute signal stays. Card deadlines come from one table next to the person-wait tool list: Scient Agent and Oh My Pi 10 min, Antigravity 150 s, every other agent 4 min (T3's rule for a call that stays silent). On expiry the agent gets a clean timed_out. Commit 3 makes this one deadline per tool call, not per card.
  • Antigravity and a connector that dies (G1 part 1). In the live check, Antigravity still ended the turn with CT Crash on. Its process spawned, so a session id was issued, and then it died. The next tools/list on that session got HTTP 404 (MCP load failed for ct-crash … HTTP 404). Discovery on a dead session of a Scient-run program now meets the empty server, on both paths: the program's lost session and Scient's dropped proxy session. Tool calls keep the 404, so clients start a new session.

3. Codex review fixes:

  • A refused credential fails discovery. Only a key bound for a plugin was marked as refused. These were reported as failed or lost, so initialize and tools/list returned success with no tools:

    • a stored or bound key refused with 401;
    • GitHub refusing every token Source Control has;
    • a sign-in the service no longer accepts (refresh refused, or the refreshed token refused).

    Each of these is now one rejected outcome, and every request fails on it, discovery too. A hosted 403 counts only with auth evidence (commit 4). A connector that is gone, off or unreachable still answers discovery as an empty server. The connector check reports these as before: a refused sign-in reads as needs sign-in.

  • One card deadline per tool call. Each card got the caller's full wait. So setup asking for two keys, or an add asking for a client ID and then a secret, could keep Antigravity's call open past 180 s. Now one allowance starts with the tool call (scient_connector_setup, scient_connector_add, scient_account_add). Each card gets what is left minus 5 s to answer. No card opens with less than 15 s left. Once a card times out, or the run ends under it, no further card opens in that call. declined, cancelled and timed_out stay distinct. A client-secret card that timed out or closed no longer counts as "no secret".

4. Codex re-check fixes:

  • A refused sign-in keeps failing. After the service refused a refresh, or the refreshed token, only the request that saw it failed. The connector then reads "needs sign-in", and the proxy's grant check sent every later request to the empty server. So the next initialize succeeded and tools/list answered no tools. Scient now keeps the refusal for the credential generation it ended: the message for the agent, never a token, and only in memory. Every later request fails with it, discovery too. It clears when the person signs in again, turns the connector off, or removes it. The grant check now covers only who may use a connector (on, eligible, this project, this agent). Whether it is signed in is decided where the request is forwarded, which already refused anything not connected.
  • Only an auth 403 is a refused credential. Commit 3 treated any 403 from a hosted connector holding a credential as a refusal, an HTML edge-policy page too. Now a 403 counts only with a WWW-Authenticate challenge, or a JSON error naming an auth failure: invalid_token, insufficient_scope, invalid_api_key, unauthorized, unauthenticated or authentication_error, as error, code, error_code or error.code/type/status. At most 16 KiB of the body is read. Any other 403 answers discovery as an empty server again. Tool calls are refused either way.

Why

Analytics for 11-12 to 11-14 (reviews/analytics-failures-20261115, group G4) showed four separate causes:

  • the 5 s add deadline (3 unreachable adds, which then worked 20–77 s later);
  • the accounts labelling;
  • setup refusing hosted connectors;
  • key cards outliving their caller (4 exceptions).

Neither #927 nor the 11-13 stress work fixed any of them. The decided design is in ORCHESTRATION.md "G4 — connectors".

Scient Agent cut-off, reproduced with Bun 1.4.4, the version Scient Agent embeds:

Bun 1.4.4 client Server Result
default fetch answers at 330 s (headers late, or SSE headers at once then silence) ok
default fetch answers at 420 s (Node defaults, or requestTimeout: 0) TimeoutError: The operation timed out. at 360 s
timeout: false answers at 420 s (both servers) ok

Production saw this at 322–345 s. Scripts and output are in reviews/analytics-failures-20261115/test-G4/timeout-repro.

Tests

Regression tests; each fails without its fix:

  • ConnectorProbe.test.ts: a server that misses the given budget is told to try again (the literal 5 s ignored the budget). A stalled SSE body is bounded too. Caller cancellation aborts the request. A hanging session DELETE doesn't hold up the answer.
  • ScientMcpAnalytics.test.ts: an unreachable connector failure inside AccountsError reports accounts / unreachable / external.
  • connectorSetup.test.ts (new): hosted ready gives "needs no setup"; a hosted sign-in names scient_connector_control; a gone key or Source Control account says to ask the user. No advice for a hosted connector names scient_connector_setup.
  • ConnectorRuntime.test.ts: an inexact add name returns candidates and adds nothing. A program that dies with its session open keeps discovery answering on both 404 paths, while tool calls still get 404.
  • accountAdd.test.ts: an Antigravity card ends under 180 s; Codex, Claude and unknown agents end under 300 s.
  • OmpScientExtension.test.ts: the bridge's tool call passes timeout: false.
  • ConnectorRuntime.test.ts (commit 3): a stored key the service accepted and then refuses (401 and 403) fails both initialize and tools/list. A refused refresh and a refused refreshed token fail initialize. GitHub refusing Source Control's only token fails initialize.
  • connectorSetup.test.ts (commit 3): on Antigravity, a first key saved after 100 s leaves the second card less than the rest of 150 s. An unanswered first card means no second card opens.

Also run, on Node 26.13.1:

  • root pnpm run typecheck, vp fmt --check, vp lint, knip;
  • server suites scient/extensions, scient/accounts, telemetry, provider, mcp/toolkits, scient/skills, scient/storage and CodexAdapterV2 (3352 passed). The one failure, provider/Drivers/ClaudeSkills.test.ts (EEXIST on macOS's case-insensitive disk), is in a file this PR doesn't touch;
  • web scient/extensions (125), client-runtime work-log (186), contracts (518);
  • scient-seam-check --base origin/main passes. Both accounts and OMP manifests now classify ScientPersonWaitTools.ts;
  • verify-upstream-provenance passes.

Agent context budget grows; this is Scient's own text, not T3's:

  • Scient awareness +173 bytes: the stress-test decision's host-awareness line;
  • MCP tool list +58 bytes: setup now serves every connector.

So I did not add the agent-context-increase label; that's the maintainer's call.

  • ConnectorRuntime.test.ts (commit 4): after a refused refresh and after a refused refreshed token, a second initialize and a tools/list still fail; turning the connector off and on again makes it merely unavailable. A stored key refused with a JSON invalid_api_key 403 or with a WWW-Authenticate 403 fails discovery. An HTML edge 403 answers initialize and tools/list as an empty server, still fails the tool call, and the tools return once the block lifts.

Commit 3 was rerun on Node 26.13.1: root pnpm run typecheck, fmt and lint on the changed files, scient/extensions, scient/accounts, ScientPersonWaitTools, OMP extension, ScientMcpAnalytics and OrchestratorMcpService.activity (94 files, 769 passed), the seam check and provenance. Its six new tests fail on commit 2's code.

Commit 4 was rerun on Node 26.13.1: root pnpm run typecheck, fmt and lint on the changed files, and the server suites scient/extensions, scient/accounts/agent, provider, telemetry and scient/storage (2621 passed; the one failure is the same unrelated ClaudeSkills.test.ts EEXIST). Also the seam check and provenance. Its new OAuth and edge-403 tests fail with the fix disabled.

Live checks in a dev app from this branch (record: reviews/analytics-failures-20261115/test-G4/RECORD.md):

  • slow hosted add (8 s cold start): "Still connecting" at 4 s, connected at 8.3 s;
  • Antigravity hosted setup answered "needs no setup; it's ready";
  • Antigravity with an unanswered key card: clean timed_out at 150 s, before its 180 s limit;
  • Antigravity with CT Crash on: failed before the dead-session fix and completed after it;
  • Antigravity after a connector was turned off mid-thread: kept answering.

Not run live: Scient Agent's key card, and commits 3 and 4 (refused-credential discovery and the shared deadline are covered by the tests above). The dev profile had no Scient Agent model sign-in (only Antigravity's was approved for copying), and a local Ollama model rejected Scient Agent's tool schemas. The cause and the timeout: false fix were checked at the transport level, as described above.

Documentation Impact

Documentation impact: Updated — docs/internals/scient-extensions.md (from the ported stress fixes). The three connector-authoring skill copies are updated by the port.

Platforms

Platform Expected behavior Checks run Unproven
macOS All of the above. Unit/integration suites, live dev app (Apple Silicon), Bun transport reproduction. Scient Agent key card end to end.
Windows Same code paths. Corporate proxies and TLS-inspecting antivirus slow handshakes, so the 30 s budget helps most here. Local connectors fail to start more often (PATH, .cmd), so the dead-session fix matters most here. CI only. No live run. The Bun fetch deadline and timeout: false were not checked on Windows (same Bun build family).
Linux Same as macOS. CI only. No live run, no Bun reproduction.

UI Changes

The Add dialog shows "Still connecting. A hosted server can take up to 30 seconds to wake up." after 4 s of adding. Connector pages show a Host row (from the ported stress fixes).

🤖 Generated with Claude Code

yaacovcorcos and others added 2 commits November 15, 2026 01:40
…sions rework

The 15 connector stress-test bugs (reviews/connector-stress-20261113), ported onto #927
rather than copied over it:

- An installed connector that is off, removed, lost its grant, failed to start or failed in
  transport answers discovery as an empty server with the reason in its instructions, so one
  broken connector never ends an agent's turn; tool calls and rejected credentials still fail.
- Hosted tools name their host; Installed rows and pages read host facts from the whole catalog.
- Person-waiting Scient tools are direct-only on Codex; card endings keep their reason.
- Copy/save identity guards, thread-owned drafts, multi-word registry search with a cut note,
  a real start check on restart, readable env-name titles, removed-history sweep, expandable
  output-only rows, native question publication, discoverable connector tools for Scient Agent.

Kept from #927: every agent-tool path still checks the person's agent choice first. Control
takes one caller location (project, worktree, agent); copy carries both the owning thread and
the agent; the new name guards answer an excluded agent without naming what it may not see.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… cards end before the call

The G4 connector failures from analytics (11-12 to 11-14):

- Adding a hosted connector gave its MCP handshake a fixed 5 s. One budget now covers the whole
  handshake (headers, 429/503 waits and the reply body): the 30 s every other control request
  already has. The caller's cancellation reaches the request, ending the probe's session never
  holds up the answer, and a timeout says the host may be waking up and to try once more. The
  Add dialog says "Still connecting" after 4 s.
- Connector tool failures reached analytics as `accounts`. AccountsError carries an optional,
  closed failureClass from the connector's own reason, so an unreachable host reads as
  `unreachable`, owned by the external host.
- scient_connector_setup refused every hosted connector while Scient's own advice sent agents
  there. Setup now answers for every connector, and one helper gives setup and every next step
  the same route: setup for a local connector, sign-in control for a sign-in, the person for a
  hosted key or Source Control account that is gone; a ready one "needs no setup".
- Adding by an inexact name now offers up to 3 candidate names this agent may add; it never
  adds a guess.
- A key card waited 10 minutes, but the caller dropped the call first. Scient Agent's bridge
  hit Bun's own fetch deadline (~300-360 s, "The operation timed out."; reproduced with Bun
  1.4.4, which the agent embeds) and Antigravity ends a tool call at 180 s. The bridge now turns
  Bun's deadline off (its 65-minute signal stays), and cards end before the caller would drop
  the call: 10 minutes for Scient Agent, 150 s for Antigravity, 4 minutes for every other agent
  (T3's rule for a silent call). The agent gets a clean timed_out.
- Antigravity ended the whole turn when a Scient-run connector died after its session was issued:
  the next tools/list met HTTP 404. Discovery on such a session now meets the empty server; tool
  calls still hear the session is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:XXL labels Nov 15, 2026
@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 5.5 KiB 5.5 KiB 0 B (0.0%) 6.8 KiB ✅
Codex Thread snapshot wire 4.2 KiB 4.2 KiB 0 B (0.0%) 4.9 KiB ✅
Codex Live turn WebSocket wire 1.3 KiB 1.3 KiB 0 B (0.0%) 2.0 KiB ✅
Codex Live turn WebSocket decoded 22.3 KiB 22.3 KiB 0 B (0.0%) 24.4 KiB ✅
Codex Live turn messages 1 1 0 (0.0%) 8 ✅
Claude Total thread wire 5.5 KiB 5.5 KiB 0 B (0.0%) 6.8 KiB ✅
Claude Thread snapshot wire 4.2 KiB 4.2 KiB 0 B (0.0%) 4.9 KiB ✅
Claude Live turn WebSocket wire 1.3 KiB 1.3 KiB 0 B (0.0%) 2.0 KiB ✅
Claude Live turn WebSocket decoded 22.7 KiB 22.7 KiB 0 B (0.0%) 24.4 KiB ✅
Claude Live turn messages 1 1 0 (0.0%) 8 ✅

Other scenarios

All 64 scenario measurements match main.

All 64 scenario measurements
Provider Scenario Metric Main baseline This PR Impact PR ceiling
Codex short turn resume WebSocket decoded 12.0 KiB 12.0 KiB 0 B (0.0%) 12.7 KiB ✅
Codex short turn resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex long turn running, cold open HTTP decoded 281.7 KiB 281.7 KiB 0 B (0.0%) 302.7 KiB ✅
Codex long turn running, cold open rows 75 75 0 (0.0%) 75 ✅
Codex long turn running, history page HTTP decoded 92.4 KiB 92.4 KiB 0 B (0.0%) 107.4 KiB ✅
Codex long turn running, history page rows 75 75 0 (0.0%) 75 ✅
Codex long turn finished, cold open HTTP decoded 381.5 KiB 381.5 KiB 0 B (0.0%) 410.2 KiB ✅
Codex long turn finished, cold open rows 151 151 0 (0.0%) 151 ✅
Codex long turn finished, socket cold open WebSocket decoded 381.6 KiB 381.6 KiB 0 B (0.0%) 410.2 KiB ✅
Codex long turn finished, socket cold open WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex long turn finished, socket cold open rows 151 151 0 (0.0%) 151 ✅
Codex long turn finished, work page HTTP decoded 186.2 KiB 186.2 KiB 0 B (0.0%) 200.2 KiB ✅
Codex long turn finished, work page rows 150 150 0 (0.0%) 150 ✅
Codex idle thread resume WebSocket decoded 65 B 65 B 0 B (0.0%) 200 B ✅
Codex idle thread resume WebSocket messages 1 1 0 (0.0%) 1 ✅
Codex fleet shell snapshot HTTP decoded 45.1 KiB 45.1 KiB 0 B (0.0%) 53.7 KiB ✅
Codex fleet shell snapshot rows 27 27 0 (0.0%) 27 ✅
Codex fleet shell subscribe WebSocket decoded 65 B 65 B 0 B (0.0%) 200 B ✅
Codex fleet shell subscribe WebSocket messages 1 1 0 (0.0%) 1 ✅
Codex fleet shell resume check HTTP decoded 18 B 18 B 0 B (0.0%) 100 B ✅
Codex fleet shell resume check rows 0 0 0 0 ✅
Codex stale shell reload HTTP decoded 45.1 KiB 45.1 KiB 0 B (0.0%) 53.7 KiB ✅
Codex stale shell reload rows 27 27 0 (0.0%) 27 ✅
Codex stale shell resume WebSocket decoded 140 B 140 B 0 B (0.0%) 400 B ✅
Codex stale shell resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex stale todo list cold open HTTP decoded 72.4 KiB 72.4 KiB 0 B (0.0%) 83.0 KiB ✅
Codex stale todo list cold open rows 75 75 0 (0.0%) 75 ✅
Codex stale todo list cold open nodes 2 2 0 (0.0%) 4 ✅
Codex stale todo list cold open subagents 2 2 0 (0.0%) 4 ✅
Codex stale todo list cold open plans 1 1 0 (0.0%) 2 ✅
Codex stale todo list cold open providerTurns 1 1 0 (0.0%) 2 ✅
Codex stale todo list cold open checkpoints 1 1 0 (0.0%) 2 ✅
Claude short turn resume WebSocket decoded 12.2 KiB 12.2 KiB 0 B (0.0%) 12.7 KiB ✅
Claude short turn resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude long turn running, cold open HTTP decoded 283.3 KiB 283.3 KiB 0 B (0.0%) 302.7 KiB ✅
Claude long turn running, cold open rows 75 75 0 (0.0%) 75 ✅
Claude long turn running, history page HTTP decoded 93.4 KiB 93.4 KiB 0 B (0.0%) 107.4 KiB ✅
Claude long turn running, history page rows 75 75 0 (0.0%) 75 ✅
Claude long turn finished, cold open HTTP decoded 384.1 KiB 384.1 KiB 0 B (0.0%) 410.2 KiB ✅
Claude long turn finished, cold open rows 151 151 0 (0.0%) 151 ✅
Claude long turn finished, socket cold open WebSocket decoded 384.3 KiB 384.3 KiB 0 B (0.0%) 410.2 KiB ✅
Claude long turn finished, socket cold open WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude long turn finished, socket cold open rows 151 151 0 (0.0%) 151 ✅
Claude long turn finished, work page HTTP decoded 188.1 KiB 188.1 KiB 0 B (0.0%) 200.2 KiB ✅
Claude long turn finished, work page rows 150 150 0 (0.0%) 150 ✅
Claude idle thread resume WebSocket decoded 66 B 66 B 0 B (0.0%) 200 B ✅
Claude idle thread resume WebSocket messages 1 1 0 (0.0%) 1 ✅
Claude fleet shell snapshot HTTP decoded 45.6 KiB 45.6 KiB 0 B (0.0%) 53.7 KiB ✅
Claude fleet shell snapshot rows 27 27 0 (0.0%) 27 ✅
Claude fleet shell subscribe WebSocket decoded 66 B 66 B 0 B (0.0%) 200 B ✅
Claude fleet shell subscribe WebSocket messages 1 1 0 (0.0%) 1 ✅
Claude fleet shell resume check HTTP decoded 18 B 18 B 0 B (0.0%) 100 B ✅
Claude fleet shell resume check rows 0 0 0 0 ✅
Claude stale shell reload HTTP decoded 45.6 KiB 45.6 KiB 0 B (0.0%) 53.7 KiB ✅
Claude stale shell reload rows 27 27 0 (0.0%) 27 ✅
Claude stale shell resume WebSocket decoded 140 B 140 B 0 B (0.0%) 400 B ✅
Claude stale shell resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude stale todo list cold open HTTP decoded 73.4 KiB 73.4 KiB 0 B (0.0%) 83.0 KiB ✅
Claude stale todo list cold open rows 75 75 0 (0.0%) 75 ✅
Claude stale todo list cold open nodes 2 2 0 (0.0%) 4 ✅
Claude stale todo list cold open subagents 2 2 0 (0.0%) 4 ✅
Claude stale todo list cold open plans 1 1 0 (0.0%) 2 ✅
Claude stale todo list cold open providerTurns 1 1 0 (0.0%) 2 ✅
Claude stale todo list cold open checkpoints 1 1 0 (0.0%) 2 ✅

Baseline: 62b128f · PR result: 70e5f3f · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Bounded compact HTTP snapshot with live cursor.

  • Codex decoded thread snapshot: 88.2 KiB
  • Claude decoded thread snapshot: 88.4 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

…e per call

Codex review of #933:

- A refused credential met the empty server. Only a key bound for a plugin carried "rejected";
  a stored or bound key refused with 401, GitHub refusing every Source Control token, and a
  sign-in the service no longer accepts (refresh refused, or the refreshed token refused) came
  back as failed or lost, so initialize and tools/list answered success with no tools. Every
  terminal refusal is now one "rejected" outcome that fails every request, discovery too; a
  hosted service answering 403 to a credential Scient sent fails it the same way. A connector
  that is gone, off, or whose host is unreachable still meets the empty server. The connector
  check reads them as before (a refused sign-in needs sign-in).
- Each card got the caller's full wait, so setup asking two keys (or an add asking a client ID
  and then a secret) could keep Antigravity's call open past 180 s. One allowance is set when
  the tool call starts; each card gets what is left of it minus 5 s to answer, none opens with
  under 15 s left, and after a card times out or the run ends under it no further card opens in
  that call. A client secret card that timed out is no longer read as "no secret".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

This PR changes the test suite by +23 test cases (browser 0, unit +1, server +22).

Keep tests that would fail for a real reason, and test logic below the UI where it can be. See Testing.

yaacovcorcos and others added 3 commits November 15, 2026 02:53
… a refusal

Codex re-check of #933:

- After the service refused a sign-in (the refresh, or the refreshed token), only the request
  that saw it failed. The connector then reads needs-sign-in, and the proxy's grant check sent
  every later request to the empty server, so the next initialize succeeded and tools/list
  answered no tools. Scient now keeps the refusal (what to tell the agent, never a token) for
  the credential generation it ended; every later request, discovery too, fails with it until
  the person signs in again, or turns the connector off or removes it. The grant check now
  covers only who may use a connector; whether it is signed in is the forward's to answer.
- Any 403 to a hosted connector that held a credential failed discovery, an HTML edge-policy
  page too. A 403 counts as a refused credential only with a WWW-Authenticate challenge or a
  JSON error naming one (invalid_token, insufficient_scope, invalid_api_key, unauthorized,
  unauthenticated, authentication_error; at most 16 KiB read). Any other 403 meets the empty
  server again; tool calls are refused either way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…al back

Turning a connector off clears its standing refusal under the lifecycle lock,
so a refresh already in flight (which publishes its refusal under that lock)
settles first. Found in re-check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ading module

OmpRpcProcess now imports ScientAgentToolLoading, so a change to it on main
must void a pending OMP publication like the rest of its inputs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ability-20261115

# Conflicts:
#	apps/server/src/provider/agentContextBudget.scient.json
#	apps/server/src/telemetry/ScientMcpAnalytics.test.ts
@yaacovcorcos
yaacovcorcos added this pull request to the merge queue Nov 15, 2026
Merged via the queue into main with commit d666ac0 Nov 15, 2026
59 of 60 checks passed
@yaacovcorcos
yaacovcorcos deleted the claude/connector-reliability-20261115 branch November 15, 2026 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant