Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@majiayu000
Copy link

Summary

Adds Cursor and Windsurf as recognized IDE session types for usage tracking.

Fixes #21361

Changes

  • Add MagicSessionTypeCursor and MagicSessionTypeWindsurf constants in agent/agentssh/agentssh.go
  • Update extractMagicSessionType() to recognize the new session types
  • Update magicTypeMetricLabel() in agent/agentssh/metrics.go to handle the new types
  • Update connection reporting in agent/agent.go to map Cursor and Windsurf to Connection_VSCODE (since they are VS Code variants and share the same underlying protocol)

Both Cursor and Windsurf are VS Code-based IDEs that set the CODER_SSH_SESSION_TYPE environment variable when connecting. They are now properly tracked alongside VS Code for usage metrics.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.5 [email protected]

This change adds Cursor and Windsurf as recognized session types for
usage tracking. Both IDEs are VS Code variants and are now properly
identified when they set the CODER_SSH_SESSION_TYPE environment
variable.

Changes:
- Add MagicSessionTypeCursor and MagicSessionTypeWindsurf constants
- Update extractMagicSessionType() to recognize the new types
- Update magicTypeMetricLabel() to handle the new types
- Update the connection reporting switch to map Cursor and Windsurf
  to the existing VSCODE proto connection type (since they are
  VS Code variants and share the same underlying protocol)

Fixes coder#21361

Signed-off-by: majiayu000 <[email protected]>
@cdr-bot cdr-bot bot added the community Pull Requests and issues created by the community. label Dec 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community Pull Requests and issues created by the community.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Cursor and Windsurf as recognized IDE session types for usage tracking

1 participant