Skip to content

Comments sent to an agent are resolved before the agent acts (follow-up to #593) #1980

Open

Description

@chhartlein

What problem are you trying to solve?

#593 asked for comments that an agent can retrieve via MCP, act on, and then mark as resolved. The comments feature that closed it resolves a comment at the moment it is sent: completeDispatch sets state: 'resolved' (packages/server/src/comments/comment-service.ts), before the agent has read it.

In practice the Resolved list then means "sent", not "done". If the agent fails, misreads the comment or only does part of it, the comment is already closed and nothing shows that the work is still open. The agent cannot close it either: the MCP server has no comment tool, and agents only see open comments as a short note in exec output.

I review documents by leaving several comments and then asking the agent to work through them. I would like the comment panel to show what has actually been done.

Proposed solution

  1. Keep the thread open on "Send to agent" and mark it as sent (the queued flag, or a new sent state) instead of resolving it.
  2. Give agents an MCP tool to resolve a thread, with a summary. The local API already supports this (resolve with an optional summary in packages/server/src/comments/comment-api.ts). The agent resolves each comment when it has done the work, and the summary records what it changed.
  3. Show that summary in the thread, so the reviewer sees the answer where the question was asked. Full replies in a thread would be better still, but this alone closes the gap [Feature]: Comments Feature #593 described.

Area

MCP / agent integration

Alternatives considered

  • Reopening each comment by hand after checking the agent's work: that works, but the panel is wrong until then and it is easy to miss one.
  • Asking the agent to report in chat: the report and the comments then live in different places, and the comment panel still shows everything as resolved.

Seen on OpenKnowledge Desktop 0.81.4, macOS; behaviour unchanged on main as of 5 Oct 2026.

Activity

  1. chhartlein commented on Oct 27, 2026

    @chhartlein
    Author

    Related: I have opened #2348 for agent-authored comments. Comment creation over the local API ignores the agent identity today, so a comment an agent leaves appears under the person's name. Together with this issue it would close the loop: the person comments, the agent acts and resolves, and the agent can leave its own comments for review, attributed to the agent.

    For anyone working around #1980 in the meantime: resolving after the work is done already works through the local API, with POST /api/comment and {"action":"resolve","id":"<threadId>"} (and unqueue if the thread was queued).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions