René's URL Explorer Experiment


Title: Normalize workspace agent session counts into a child table · Issue #27410 · coder/coder · GitHub

Open Graph Title: Normalize workspace agent session counts into a child table · Issue #27410 · coder/coder

X Title: Normalize workspace agent session counts into a child table · Issue #27410 · coder/coder

Description: Phase 1 of the Scalable Approach for Adding New IDE Session Types RFC. Before this phase, adding an IDE session type (Cursor, Windsurf, ...) required changing 15+ files across migrations, proto, server, SDK, and UI. Replace the fixed ses...

Open Graph Description: Phase 1 of the Scalable Approach for Adding New IDE Session Types RFC. Before this phase, adding an IDE session type (Cursor, Windsurf, ...) required changing 15+ files across migrations, proto, se...

X Description: Phase 1 of the Scalable Approach for Adding New IDE Session Types RFC. Before this phase, adding an IDE session type (Cursor, Windsurf, ...) required changing 15+ files across migrations, proto, se...

Opengraph URL: https://github.com/coder/coder/issues/27410

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Normalize workspace agent session counts into a child table","articleBody":"Phase 1 of the [Scalable Approach for Adding New IDE Session Types RFC](\u003chttps://app.notion.com/p/coderhq/Scalable-Approach-for-Adding-New-IDE-Session-Types-2d2d579be5928044bfd3cab09f1466b7>). Before this phase, adding an IDE session type (Cursor, Windsurf, ...) required changing 15+ files across migrations, proto, server, SDK, and UI.\n\nReplace the fixed `session_count_*` columns on the ephemeral `workspace_agent_stats` table with a normalized child table keyed by app name, and report session counts from the agent as a dynamic proto map, so new IDEs flow end-to-end with zero schema, proto, or server changes.\n\n### Scope\n\n* New `workspace_agent_session_counts (workspace_agent_stats_id, app_name, count)` child table with `ON DELETE CASCADE`; clean-cut migration copies the \\~1 day ephemeral buffer, drops the four columns, and trims the insights covering index\n* Proto `Stats.session_counts` map (field 13, Agent API v2.11); fields 8–11 stay deprecated and the server converts them, so old agents keep reporting without changes\n* Agent: dynamic per-app counters; `extractMagicSessionType` normalizes instead of classifying against a fixed set; JetBrains process detection and SSH metric labels grouped by family\n* Shared normalization, families, and presentation live in `codersdk/appname.go`, not a separate `coderd/idemetadata` package. `NormalizeAppName` strips control characters, trims/truncates names, lowercases, and folds `-` to `_`; empty becomes `unknown`. Unregistered normalized names remain valid.\n* Bounded input: a stats report is capped at 64 distinct normalized names, excess names folded into the reserved `overflow` accounting value; workspace usage API and `coder ssh --usage-app` accept arbitrary app names\n* Read paths: latest-row queries aggregate the child table via `LEFT JOIN LATERAL`; rollup and template insights use plain hash joins (benchmarks in the PR description)\n* External surfaces stay byte-identical: deployment stats API, Prometheus gauge names, and telemetry snapshots are unchanged until phase 2 (coder/coder#27411)\n\n### Done when\n\n- [X] Per-app count storage and map-based agent reporting landed; the final producer work merged in coder/coder#28338. coder/coder#27952 was superseded and closed without merging.\n- [ ] Deployment stats, Prometheus, telemetry, and insights output are identical before and after the migration\n- [ ] Old agents (fixed proto fields) and new agents (map) both report correctly against the new server\n\n### Current phase tracking\n\n1. coder/coder#27410: normalized per-app counts and agent map reporting, complete.\n2. coder/coder#27411: external count API, metrics, and UI projection, complete; legacy-removal timing remains TBD in [CLIENT-980](https://linear.app/codercom/issue/CLIENT-980/remove-deprecated-session-count-outputs-after-an-agreed-compatibility).\n3. coder/coder#27412: connection-log method/app storage, API, filters, and UI, complete. Remaining explicit agent reporting is tracked separately in [CLIENT-1037](https://linear.app/codercom/issue/CLIENT-1037/report-agent-connection-methods-and-app-identities) / coder/coder#30467.\n4. coder/coder#27413: session rollup already uses `template_usage_stats_session_apps` (migration 000596), not shared `app_usage_mins` JSONB. Per-app insights reads/UI remain in coder/coder#29796.\n5. coder/vscode-coder#1044 and coder/jetbrains-coder#599: actual editor reporting. Registry additions landed in coder/coder#30116; client and JetBrains watcher readiness are separate from registry availability.\n\nThe [Completing Scalable IDE Session Tracking RFC](\u003chttps://app.notion.com/p/3e9d579be5928178b37ce324b8ba0c8b>) supersedes the obsolete phase descriptions. [CLIENT-998](https://linear.app/codercom/issue/CLIENT-998/optional-move-workspace-app-usage-jsonb-into-a-child-table)'s web-app storage migration and [CLIENT-1010](https://linear.app/codercom/issue/CLIENT-1010/expose-per-app-session-duration-from-the-connection-log)'s duration feature are optional follow-ups, not release gates.\n\n---\n\n🤖 Created by Coder Agents on behalf of @EhabY.\n\nStale architecture and phase text corrected by Coder Agents on behalf of @EhabY; status remains Done.","author":{"url":"https://github.com/EhabY","@type":"Person","name":"EhabY"},"datePublished":"2026-07-22T09:20:27Z","url":"https://github.com/coder/coder/issues/27410"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:7848b84d-956f-a32c-9e8a-c506f296e29f
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9DFA:14F601:1FCBEA8:286B2B3:6B0153CE
html-safe-nonce04e2ce10fba575e4a96073f58a09ecf7aafb9cb80d8eda3620fda43b230f8c30
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5REZBOjE0RjYwMToxRkNCRUE4OjI4NkIyQjM6NkIwMTUzQ0UiLCJ2aXNpdG9yX2lkIjoiMzU4OTg2Nzk0NTY0OTU5MTI0NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac800ae796f6e6c42edc104f096adba63826050d7b1cb708c2ca3e8e85c8d08ea1
hovercard-subject-tagissue:4947440647
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/coder/coder/27410/issue_layout
twitter:imagehttps://opengraph.githubassets.com/0fd5b8683e42542137baa2da425e5988a0bb4059c5d980216d43f1ce9fef00a2/coder/coder/issues/27410
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/0fd5b8683e42542137baa2da425e5988a0bb4059c5d980216d43f1ce9fef00a2/coder/coder/issues/27410
og:image:altPhase 1 of the Scalable Approach for Adding New IDE Session Types RFC. Before this phase, adding an IDE session type (Cursor, Windsurf, ...) required changing 15+ files across migrations, proto, se...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameEhabY
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/coder/coder git https://github.com/coder/coder.git
octolytics-dimension-user_id95932066
octolytics-dimension-user_logincoder
octolytics-dimension-repository_id440752086
octolytics-dimension-repository_nwocoder/coder
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id440752086
octolytics-dimension-repository_network_root_nwocoder/coder
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/coder/coder/issues/27410#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcoder%2Fissues%2F27410
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcoder%2Fissues%2F27410
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=coder%2Fcoder
Reloadhttps://github.com/coder/coder/issues/27410
Reloadhttps://github.com/coder/coder/issues/27410
Reloadhttps://github.com/coder/coder/issues/27410
coderhttps://github.com/coder
coderhttps://github.com/coder/coder
Codehttps://github.com/coder/coder
Issues320 (320)https://github.com/coder/coder/issues
Pull requests470 (470)https://github.com/coder/coder/pulls
Discussionshttps://github.com/coder/coder/discussions
Actionshttps://github.com/coder/coder/actions
Projectshttps://github.com/coder/coder/projects
Security and quality49 (49)https://github.com/coder/coder/security
Insightshttps://github.com/coder/coder/insights
https://github.com/coder/coder
New issuehttps://github.com/login?return_to=https://github.com/coder/coder/issues/27410
New issuehttps://github.com/login?return_to=https://github.com/coder/coder/issues/27410
Featurehttps://github.com/coder/coder/issues?q=type:"Feature"
Normalize workspace agent session counts into a child tablehttps://github.com/coder/coder/issues/27410#top
https://github.com/EhabY
vs-codehttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22vs-code%22
https://github.com/EhabY
EhabYhttps://github.com/EhabY
on Jul 22, 2026https://github.com/coder/coder/issues/27410#issue-4947440647
Scalable Approach for Adding New IDE Session Types RFChttps://app.notion.com/p/coderhq/Scalable-Approach-for-Adding-New-IDE-Session-Types-2d2d579be5928044bfd3cab09f1466b7
Expose per-app session counts in deployment stats, Prometheus, and the UI #27411https://github.com/coder/coder/issues/27411
feat: report arbitrary workspace agent session types #28338https://github.com/coder/coder/pull/28338
feat: normalize workspace agent session counts into a child table #27952https://github.com/coder/coder/pull/27952
Normalize workspace agent session counts into a child table #27410https://github.com/coder/coder/issues/27410
Expose per-app session counts in deployment stats, Prometheus, and the UI #27411https://github.com/coder/coder/issues/27411
CLIENT-980https://linear.app/codercom/issue/CLIENT-980/remove-deprecated-session-count-outputs-after-an-agreed-compatibility
Separate connection log methods from app identities #27412https://github.com/coder/coder/issues/27412
CLIENT-1037https://linear.app/codercom/issue/CLIENT-1037/report-agent-connection-methods-and-app-identities
feat: report agent connection methods and app identities #30467https://github.com/coder/coder/pull/30467
Report template insights session usage per app #27413https://github.com/coder/coder/issues/27413
feat!: report template insights session usage per app #29796https://github.com/coder/coder/pull/29796
Report the actual IDE (Cursor, Devin Desktop, ...) for session tracking vscode-coder#1044https://github.com/coder/vscode-coder/issues/1044
Send the specific JetBrains IDE name for session tracking jetbrains-coder#599https://github.com/coder/jetbrains-coder/issues/599
feat: recognize VS Code forks and JetBrains IDEs as session apps #30116https://github.com/coder/coder/pull/30116
Completing Scalable IDE Session Tracking RFChttps://app.notion.com/p/3e9d579be5928178b37ce324b8ba0c8b
CLIENT-998https://linear.app/codercom/issue/CLIENT-998/optional-move-workspace-app-usage-jsonb-into-a-child-table
CLIENT-1010https://linear.app/codercom/issue/CLIENT-1010/expose-per-app-session-duration-from-the-connection-log
@EhabYhttps://github.com/EhabY
@EhabYhttps://github.com/EhabY
EhabYhttps://github.com/EhabY
Featurehttps://github.com/coder/coder/issues?q=type:"Feature"
on Jul 22, 2026https://github.com/coder/coder/issues/27410#event-28317201482
https://github.com/apps/linear-code
linear-codehttps://github.com/apps/linear-code
on Jul 22, 2026https://github.com/coder/coder/issues/27410#issuecomment-5044096035
Linear Codehttps://linear.app
ENG-3074https://linear.app/codercom/issue/ENG-3074
EhabYhttps://github.com/EhabY
on Jul 22, 2026https://github.com/coder/coder/issues/27410#event-28317704524
EhabYhttps://github.com/EhabY
Add Cursor and Windsurf as recognized IDE session types for usage tracking #21361https://github.com/coder/coder/issues/21361
on Jul 22, 2026https://github.com/coder/coder/issues/27410#event-28319071482
EhabYhttps://github.com/EhabY
Add Cursor and Windsurf as recognized IDE session types for usage tracking #21361https://github.com/coder/coder/issues/21361
on Jul 22, 2026https://github.com/coder/coder/issues/27410#event-28319072378
EhabYhttps://github.com/EhabY
on Jul 22, 2026https://github.com/coder/coder/issues/27410#event-28319801084
jeremyruppelhttps://github.com/jeremyruppel
vs-codehttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22vs-code%22
on Aug 10, 2026https://github.com/coder/coder/issues/27410#event-29225991724
pullhttps://github.com/apps/pull
on Aug 20, 2026https://github.com/coder/coder/issues/27410#event-29775092951
refactor: normalize workspace agent session metadata (coder#28124)https://github.com/annihilatorrrr/coder/commit/c767cc51982fdde009328cfe97cb63fce15d0f6b
coder#28124https://github.com/coder/coder/pull/28124
c767cc5https://github.com/annihilatorrrr/coder/commit/c767cc51982fdde009328cfe97cb63fce15d0f6b
EhabYhttps://github.com/EhabY
on Aug 21, 2026https://github.com/coder/coder/issues/27410#event-29775666254
feat: add workspace agent session count protocol (#28125)https://github.com/coder/coder/commit/903d7b756d91f3e8fcf3648067014ebad1b45480
#28125https://github.com/coder/coder/pull/28125
903d7b7https://github.com/coder/coder/commit/903d7b756d91f3e8fcf3648067014ebad1b45480
aslilachttps://github.com/aslilac
on Aug 24, 2026https://github.com/coder/coder/issues/27410#event-29934841377
refactor: normalize workspace agent session metadata (#28124)https://github.com/coder/coder/commit/acf053cfbef4871854c34bb4bb01f55af26f8af7
#28124https://github.com/coder/coder/pull/28124
acf053chttps://github.com/coder/coder/commit/acf053cfbef4871854c34bb4bb01f55af26f8af7
feat: add workspace agent session count protocol (#28125)https://github.com/coder/coder/commit/459adda8972245b8bdadc04c4f64944b17e7a43a
#28125https://github.com/coder/coder/pull/28125
459addahttps://github.com/coder/coder/commit/459adda8972245b8bdadc04c4f64944b17e7a43a
EhabYhttps://github.com/EhabY
on Sep 18, 2026https://github.com/coder/coder/issues/27410#event-31392384092
feat: store session usage per app and family in template usage stats (#…https://github.com/coder/coder/commit/817fc77612785f082d0af8514e86a5ab8e734058
#…https://github.com/coder/coder/pull/29109
817fc77https://github.com/coder/coder/commit/817fc77612785f082d0af8514e86a5ab8e734058
EhabYhttps://github.com/EhabY
completedhttps://github.com/coder/coder/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
9974294https://github.com/coder/coder/commit/9974294ca9ccb91d2a0253fdd43866f3d8e64683
on Sep 18, 2026https://github.com/coder/coder/issues/27410#event-31422814129
trilliumhttps://github.com/trillium
on Sep 18, 2026https://github.com/coder/coder/issues/27410#event-31423720320
feat: report arbitrary workspace agent session types (coder#28338)https://github.com/trillium/coder/commit/9974294ca9ccb91d2a0253fdd43866f3d8e64683
coder#28338https://github.com/coder/coder/pull/28338
https://docs.github.com/articles/closing-issues-via-commit-messages
9974294https://github.com/trillium/coder/commit/9974294ca9ccb91d2a0253fdd43866f3d8e64683
Sign up for freehttps://github.com/signup?return_to=https://github.com/coder/coder/issues/27410
Sign in to commenthttps://github.com/login?return_to=https://github.com/coder/coder/issues/27410
EhabYhttps://github.com/EhabY
vs-codehttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22vs-code%22
Featurehttps://github.com/coder/coder/issues?q=type:"Feature"
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.