task +comment: no way to @mention users in task comments (all mention syntaxes stored as literal text)

Open
#2,927 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
go
Domain
cli, documentation

Research direction

Start by reading the task +comment shortcut and the raw task comments create command in the Go source to see how content is built and sent, then compare against the Feishu Task v2 comment API schema to confirm whether any mention field (rich_content or an <at> tag) is accepted. Reproduce with a throwaway task by posting each syntax and reading it back with task comments list, as the issue does. Done means the lark-task skill and +comment reference state exactly what is and is not supported regarding mentions, with a --mention <open_id> flag only if the API turns out to accept one.

Written by the indexing model from the issue text.

Description

domain/core domain/task enhancement

Summary

There is no way to @mention a user in a task comment (or description) through lark-cli. Every mention syntax I tried is stored as literal text, so the mentioned user gets no mention notification. Comments written in the Feishu client with @mentions read back as @Name(...). That shows the backend supports mentions, but neither the CLI nor the documented Task v2 comment API seems to expose a way to write them.

Environment

  • lark-cli 1.0.100 (latest release), Linux
  • Feishu (China) tenant, user identity (--as user)
  • Commands: task +comment, and raw task comments create (same result)

Reproduction

Using a throwaway task, I posted one comment for each candidate syntax, then read the comments back with task comments list:

Content written Read back as
<at id=ou_xxx></at> test identical literal text
<at id="ou_xxx"></at> test identical literal text
<at user_id="ou_xxx">Name</at> test identical literal text
@ou_xxx test identical literal text

For comparison, a comment created in the Feishu client with a real @mention reads back through the same API as:

@Alice(ABC)  @Bob(DEF)  some text

rich_content is null on comments, and the task.comments.create schema only exposes a plain string content field.

According to #2359, comment content is rendered as Markdown in the client, and <x> spans are dropped. This makes the <at ...> attempts worse than a no-op: the mention markup disappears for readers, and the writer gets no error.

Why it matters

Agents and scripts use task comments to ask specific people for input, like "please confirm X". Followers do get a generic task-update notification. Without a real mention, though, the addressed person gets no targeted alert. The writer also has no way to know the mention failed.

Ask

Any of the following would help:

  1. If the Task v2 comment API accepts a mention format today (e.g. a <at>-style tag or a structured field), document it in task +comment and add a --mention <open_id> flag (repeatable) to the shortcut.
  2. If the API does not support it, state this explicitly in the lark-task skill and +comment reference. Also warn that <at ...> tags are stored literally and swallowed by the client's Markdown renderer.
  3. Relay the feature request to the Task team: support mentions in comments through OpenAPI, consistent with IM messages (<at user_id="ou_xxx"></at>) and the legacy task v1 Markdown module (<at id=open_id></at>).

Related: #2359 (Markdown rendering silently drops spans), #2284 (typed comment read API).

Dominant language
Go
Stars
18.2k
Forks
1.4k
Avg merge
1d 3h
Merged PRs (30d)
18

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from larksuite/cli

All issues in larksuite/cli

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.