Skip to content

Fix : Scope implicit TypeAgent conversation bindings to Copilot sessions - #3109

Open
George Ng (GeorgeNgMsft) wants to merge 1 commit into
mainfrom
georgengmsft-typeagent-conversation-error
Open

George Ng (GeorgeNgMsft) wants to merge 1 commit into
mainfrom
georgengmsft-typeagent-conversation-error

Conversation

@GeorgeNgMsft

Copy link
Copy Markdown
Contributor

TypeAgent's implicit default conversation was saved per server and reused indefinitely across unrelated Copilot sessions. Once that conversation disappeared, restarting Copilot kept producing Conversation not found. This change scopes automatic selections to the actual Copilot session, so a fresh session resolves the current server default while existing sessions keep their selected context. It does not explain or repair why the original server conversation disappeared.

  • Share automatic context across NL delegation, direct/dev hooks, extension history, and structured calls using the host session ID and server URL. Use hook input IDs rather than potentially stale inherited environment IDs.
  • Preserve atomic cross-process selection and keep reconnects/resumed sessions pinned. Explicit environment/config pins still fail closed; requests are never automatically replayed and private owners, approvals, scopes, and resume capabilities are not migrated.
  • Ignore—but do not delete or rewrite—legacy server-only implicit bindings. Use consistent session-binding storage despite the CLI injecting CLAUDE_PLUGIN_DATA into hooks but not MCP processes; configuration lookup is unchanged.
  • Use process-local NL/structured selection on hosts without MCP session identity, documenting that cross-process alignment there requires an explicit conversation ID.
  • Add lifecycle, concurrency, host-identity, legacy-preservation, missing-pin, and no-replay regression coverage; update binding/recovery documentation.

Validation

  • Dependency-aware plugin build: pnpm exec fluid-build '@typeagent/copilot-plugin' -t build --dep.
  • 233 plugin unit tests, 12 launcher tests, and 146 agent-server-client tests passed.
  • Changed-file formatting and all four PR ratchets passed (lint, complexity, circular dependencies, and test debt).
  • Actual standalone Copilot CLI 1.0.89 with the built hook/MCP and real WebSocket/RPC transport passed: identical NL/structured fixture data, resumed direct-hook context after a default change, fresh-session default selection, missing resumed/explicit IDs with no dispatch, and legacy binding preservation.

Limits and deployment

The CLI smoke used isolated storage, a scripted local model, and an in-memory TypeAgent protocol fixture—not production agents or the user's weather/recording request. The installed plugin, shared daemon, and user's saved bindings were not changed. The fix requires installing the updated plugin; a new session resolves the default, while resuming a session with a missing selection remains fail-closed.

This is an independent main-based PR, not a change to the macro classifier/runner PRs. Local smoke scripts, transcripts, and receipt are retained under session 27c72031-8531-4d97-aec8-1cae6cf20e8d (files/cli-smoke-1790731646376/receipt.json).

Resolve fresh sessions against the current default while preserving selected context and private structured ownership for existing sessions. Ignore legacy server-wide implicit pins without deleting them.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@GeorgeNgMsft George Ng (GeorgeNgMsft) changed the title Scope implicit TypeAgent conversation bindings to Copilot sessions Fix : Scope implicit TypeAgent conversation bindings to Copilot sessions Sep 30, 2026

This branch has not been deployed

No deployments
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.

2 participants