web: an agent link with a private reference says so instead of "missing parameters"
Agent session links posted in public places can now name the session by a private reference, https://cmux.com/deeplink/agent?id=aid-<20 hex>, instead of carrying its harness, session and machine. On this page such a link read as broken: "This link is missing required parameters: harness, session".
Change
deeplink-agent.ts:AGENT_REFERENCE_PATTERN(^aid-[0-9a-f]{20}$) andagentReference(params), which returns the reference only when the link has nosession.page.tsx: for such a link the page says it names a session by a private reference and does not open from this page, and shows no native URL or Open button. A malformedidis still a link with no session.en.json: one new string,deeplink.agent.reference. Other locales fall back to English through the existing message merge.
What this does not do: the page never resolves a reference. No table, key, endpoint or lookup ships here, and the reference itself is not echoed into the page. Readable links (harness, session, ...) behave exactly as before.
Before / after (rendered text, /deeplink/agent?id=aid-0123456789abcdef0123):
- Before: "This link is missing required parameters: harness, session" / "Native URL: cmux://agent" / "Fix the URL parameters, then reload this page."
- After: "This link names an agent session by a private reference, not by its machine or session. It does not open from this page; team members look the reference up with their own tools."
Tests: bun test tests/deeplink-agent-page.test.tsx tests/deeplink-agent.test.ts: 59 pass, 0 fail (new: a private reference shows its message, no Open, no native URL and no echo of the id; a malformed reference is a missing-session link). bunx tsc --noEmit clean.
Risk: low. One page branch that only fires for a link with a well-formed id and no session.
🤖 Generated with Claude Code
Agent session: agent session
![View with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3-3x.png)
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by CodeRabbit
- New Features
- Agent links with a valid private reference now show a message explaining how the reference is used, without displaying the reference itself.
- Bug Fixes
- Private-reference links no longer show an Open action, native URL, or fallback text.
- Malformed agent links continue to show a missing-information message; other link behavior is unchanged.