feat(coder/agent-relay-cursor): export the cloud session id - #1146
Merged
Merged
Conversation
Templates can open the Cursor cloud session from a coder_app when Agent Relay stamps agent_relay_session_id.
Contributor
Module Scorecard Check
|
| Theme | Before | After |
|---|---|---|
| Presentation & Onboarding | 5 / 17 | 6 / 17 |
| Integration | 20 / 25 | 5 / 25 |
| Credential Hygiene | 20 / 20 | 12 / 20 |
| Restricted-Environment | 10 / 20 | 12 / 20 |
| Engineering Quality | 10 / 10 | 10 / 10 |
| Overall | 71 / 100 | 49 / 100 |
Full scorecard for this PR
| Presentation & Onboarding | Agent Integration | Credential Hygiene | Restricted-Environment Readiness | Engineering Quality | Overall |
|---|---|---|---|---|---|
| 6 / 17 | 5 / 25 | 12 / 20 | 12 / 20 | 10 / 10 | 49 / 100 |
Drilldown
Presentation & Onboarding — 6 / 17
| Criterion | Max | Score | Notes |
|---|---|---|---|
| Configuration-mode examples | 12 | 6 | Only one code example is shown (install_cli). Other modes — computer_use, cli_binary override, repo-scoped pools, credential-kind switching — are described only in prose/tables (e.g. the insecure_shared_token credential-kind table), with no worked example for each mode. |
| Visual preview | 5 | 0 | No image, GIF, or video anywhere in the README. |
Agent Integration — 5 / 25
| Criterion | Max | Score | Notes |
|---|---|---|---|
| AI governance | 10 | 0 | No mention of Coder AI Gateway or Agent Firewall anywhere; the module integrates with "Agent Relay," a distinct dispatch mechanism, not AI Gateway/Agent Firewall. |
| Dashboard entry point | 5 | 5 | coder_app.cursor_web and coder_app.cursor_desktop are implemented and documented ("Open in Cursor Web"/"Open in Cursor Desktop" section), conditioned on agent_relay_session_id. |
| Session continuity | 5 | 0 | No documented resume/reconnect support or persistent session manager (tmux/screen). The module documents idle-release timers and worker restart/liveness bookkeeping, but this governs workspace reaping, not resuming an interrupted agent session. |
| Managed configuration | 5 | 0 | No documented MCP, settings, policy, or workdir management by this module (repo cloning/SCM credentials are explicitly pushed to the template, not handled here). |
Credential Hygiene — 12 / 20
| Criterion | Max | Score | Notes |
|---|---|---|---|
| Secrets marked sensitive | 16 | 8 | agent_relay_credential uses styling.mask_input = true and ephemeral = true, not a literal sensitive = true. README examples show no inline/plaintext secrets, and the "Worker credential" section explains masking and non-persistence in detail, but the literal sensitive-marking mechanism required by the rubric is absent. |
| Non-hardcoded auth path | 4 | 4 | README's "Worker credential" section documents the service-account key never leaving Agent Relay; a per-user, short-lived sub-token is exchanged automatically and injected via env var — no raw key pasted into the template. |
Restricted-Environment Readiness — 12 / 20
| Criterion | Max | Score | Notes |
|---|---|---|---|
| Mirrorable artifact source | 5 | 0 | install.sh.tftpl hardcodes curl https://cursor.com/install -fsSL | bash. No module variable (only cli_binary, install_cli, state_file, log_file, serving_log_pattern, computer_use exist) overrides this download URL. |
| Bring-your-own binary | 10 | 10 | install_cli = false fully skips download; README documents this explicitly ("Bake it into the image and set this to false for faster workspaces," plus the Requirements section), and tests confirm a pre-baked ~/.local/bin/agent is found. |
| Egress transparency | 3 | 0 | No dedicated README section enumerating install/runtime endpoints (e.g. cursor.com) or notes for restricted/air-gapped environments; the domain only appears in script comments, not the README. |
| Runs without sudo | 2 | 2 | install.sh.tftpl, start.sh.tftpl, and status.sh.tftpl contain no sudo invocations anywhere; scripts run entirely as the workspace user. |
Engineering Quality — 10 / 10
| Criterion | Max | Score | Notes |
|---|---|---|---|
| Input quality | 6 | 6 | Clear, thorough descriptions for every variable; sensible defaults (install_cli = true, computer_use = false); validation blocks on cli_binary (command-safe regex) and serving_log_pattern (non-empty). |
| Test coverage | 4 | 4 | main.tftest.hcl covers the parameter contract, script wiring, credential-kind branching, and injection-safety; main.test.ts runs true end-to-end container tests covering install/start lifecycle, restart semantics, liveness detection, and shell-injection safety. |
Overall — 49 / 100
Raw 45 / 92 → round(45 / 92 × 100) = 49
Tip
You can run this locally by telling your agent: "review this module against .github/scorecard/SCORECARD.md".
Scored against SCORECARD.md with solstice-1. Language-model scores are advisory.
…d Desktop The module adds the buttons when Agent Relay stamps a session id, using Cursor's names for the two clients.
This comment was marked as resolved.
This comment was marked as resolved.
Member
Author
|
Tested this in the Dogfood environment. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
session_idfrom the Cursor Agent Relay module. It is theagent_relay_session_idAgent Relay already stamps, and it is empty when a person creates the workspace by hand.https://cursor.com/agents/<id>cursor://anysphere.cursor-deeplink/background-agent?bcId=<id>Test plan
session_idand creates neither app (main.tftest.hcl)agent-relay-template-dockerpins this commit and a Cursor dispatch shows both buttons