Skip to content

Conversation

@continue
Copy link
Contributor

@continue continue bot commented Oct 21, 2025

Problem

VS Code extension randomly switched organization from "Continue" to "Personal" even though the user was still using Awesome Models, causing a "You have exceeded the chat limit for the Free Trial" error.

Related Slack thread: https://continuedev.slack.com/archives/C060AV775UZ/p1761007831053639?thread_ts=1761007831.053639&cid=C060AV775UZ

Changes

This PR adds comprehensive logging and telemetry to diagnose and prevent unexpected organization switches:

1. Telemetry Tracking

  • Added org_switch event to track when users explicitly switch organizations
  • Added org_fallback event to detect when saved org selection is not available

2. Enhanced Logging

  • Log all org and profile switch events with before/after details
  • Log when saved org selection falls back to default
  • Detect and log unexpected org changes during config reloads
  • Improved error messages for invalid org/profile switches

3. Better Error Handling

  • More descriptive error messages when attempting to switch to non-existent org/profile
  • Error logging before throwing to ensure issues are captured

Testing

The changes add observability without modifying core logic, making them low-risk. The logging will help us:

  1. Identify when and why unexpected org switches occur
  2. Track frequency of org fallbacks
  3. Detect patterns in the reported issue

This agent session was co-authored by karthik and Continue.


Summary by cubic

Adds logging, telemetry, and safeguards to org/profile switching to diagnose and prevent unexpected org changes (e.g., switching to Personal) that cause free-trial limit errors. Improves observability without changing core switching logic.

  • Bug Fixes
    • Detect unexpected org changes during config reload; record previous/new org and reason.
    • Validate org/profile IDs before switching; pre-log and throw clear errors on invalid targets.
    • Capture telemetry for explicit switches and fallbacks (org_switch, org_fallback) with before/after details and available orgs.

- Add telemetry tracking for org switches to monitor frequency
- Log all org and profile switch events with before/after details
- Add fallback detection logging when saved org is unavailable
- Track unexpected org changes during config reloads
- Improve error messages for invalid org/profile switches

This helps diagnose issues where VS Code extension switches orgs
unexpectedly (e.g., from Continue to Personal) while using models.

Generated with [Continue](https://continue.dev)

Co-Authored-By: Continue <noreply@continue.dev>
Co-authored-by: Username <tingwai@continue.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant