when creating comments from agents the @mentions generally don't work
they might be the right name and everything, but are not linked when viewed in the linear website/app
linear docs have a clear way describing how to do this: https://linear.app/developers/graphql#adding-mentions-in-markdown
i think we basically just need the skill to a) know to use urls instead of usernames and b) have the tools at hand to easily look up a username or something. if the agent is aware of the team they are operating in via config file that would be helpful, perhaps we can do that via bash invocation on skill load via bang syntax? i.e. inject current user, team, or other basic info.
Adding mentions in Markdown
In the Linear application, you can add mentions to users, issues, projects, and other resources by typing @ and then selecting a resource to mention.
In the GraphQL API, mentions can be created in Markdown by using the plain URL of the resource. For example:
https://linear.app/yourworkspaceurl/profiles/someuser what do you think about
https://linear.app/yourworkspaceurl/issue/LIN-123/some-issue here?
Will convert into:
@user what do you think about @LIN-123 some issue here?
Where the bolded segments are mentions.
@schpet Also facing this issue, more gripe personally with the lack of ticket IDs automatically being picked up as links. Happy to take a stab at a fix, don't quite fully understand the issues you had with your PR but will go do some digging. Any pointers appreciated 👍
Was your main takeaway that this just shouldn't be a CLI change, but just try to coerce the skill into always saying full URL links instead?
Was your main takeaway that this just shouldn't be a CLI change, but just try to coerce the skill into always saying full URL links instead?
yeah basically! i don't eg want to get into string replacement or that kind of thing if i can avoid it
my previous prs were just experiments with llm codegen and not worth checking out
Thanks for documenting this. We ran into the same distinction between literal @name text and a real Linear mention while building linear-sdk-cli.
Disclosure: I maintain that project. Our solution is an explicit, repeatable --mention <name|email|me|id> option on comment add, reply, update, and the branch-aware issue-comment command. It resolves the workspace user exactly and writes a structured Linear mention token, while ordinary @name prose remains untouched:
lin issue comment TES-123 "Please review this." --mention ada
lin comment add TES-123 --body-file note.md --mention ada --mention grace
We also live-tested the resulting stored Markdown token and keep focused coverage around resolution, deduplication, mention-only comments, and literal @ text. This may be useful either as an immediate alternative or as a reference for an explicit-intent approach here. Thank you again for the original CLI and skill work that informed ours.
Shipped in v2.6.0.
Fixed — agents can now create mentions that actually resolve.
team members --jsonanduser list --jsoninclude each member's canonical Linearurl. Pasting that URL into a comment body creates a real mention;@namedoes not.- Every command that takes a Markdown body says so in its help, and
linear markdownis a full reference for mentions and collapsible sections. - The bundled skill resolves mentions team-first and uses the returned URLs verbatim.