Skip to content

bug(platform): a task made from a chat carries only the last message, so its agent cannot see what was said or made earlier #5357

Open

Description

@yannickmonney

Summary

A task made from a chat with Create task carries the person's last message, the files they uploaded in that chat, and a link back to it. The agent working the task gets nothing else: not the earlier messages, not the assistant's answers, and not the images or files the assistant made in the chat. The link does not help, because the agent cannot open the app. So when a request depends on what was said or made earlier ("the deadline I mentioned", "improve this image"), the agent reports that it cannot see it, while the chat assistant in the same conversation answers correctly.

Reported as "asking an agent questions about images or previous messages in the chat: the agent says it cannot access this information but answers correctly in the chat (or sometimes not?)". Reproduced on main 7d7b1ee98 (2026-11-04).

What the code does today (main 7d7b1ee98)

  • services/platform/app/features/chat/lib/chat-task-draft.ts:54-57: the description starts from the last user message only (requests.at(-1)).
  • services/platform/app/features/chat/lib/chat-task-draft.ts:73-81: the description is that message plus a Markdown link to the chat URL.
  • services/platform/app/features/chat/lib/chat-task-draft.ts:83-96: attachments are collected from user messages only, so images from generate_image and files from create_file/run_code are left out; :106 keeps the newest TASK_ATTACHMENTS_MAX (50, services/platform/backend/core/tasks/helpers.ts:28).
  • services/platform/backend/domains/tasks/source-thread.ts:11-21: the stored link to the chat (tasks.source_thread_id) feeds the chat's task tray; nothing hands the conversation to the agent.
  • The chat's hand-over note tells the person: "The task takes their request, the files they shared, and a link back to this chat." (services/platform/lib/chat/handover.ts:71).

What was observed

Local stack on main 7d7b1ee98; project agent on Claude Code with Claude Sonnet 5.5 through an OpenAI-compatible Bifrost gateway.

  1. Project chat, three messages: an image upload with "Was steht auf diesem Bild?" (the chat read "Codewort: KOLIBRI 7"), then "Merke dir bitte: Die Deadline für Projekt Kolibri ist der 14. Dezember.", then "Schreibe eine kurze Notiz (höchstens drei Zeilen) mit dem Codewort aus dem Bild und der Deadline, die ich vorhin genannt habe."

  2. The chat answered correctly: "Codewort: KOLIBRI 7 / Deadline: 14. Dezember".

  3. Create task → Create and start agent. The dialog held the last message, the link, and the uploaded image.

  4. The agent read the image but not the deadline:

    Die Notiz ist nur halb fertig: Das Codewort steht drin, die Deadline fehlt, weil ich sie nirgends finden konnte. … Die Deadline, die du im Chat genannt hast, steht weder in der Aufgabenbeschreibung noch in den Anhängen. Der Chat-Link ließ sich von hier aus nicht öffnen …

    It delivered a note with Deadline: [FEHLT – dein Chat-Hinweis war für mich nicht lesbar, bitte eintragen].

  5. After a task comment with the deadline and an @-mention, the agent's next run used both the comment and the image. Inside a task's own discussion, earlier comments do reach the agent.

  6. A second chat where the assistant had generated three images: Create task opened with no attachments. An agent asked about "this image" would not see it. This is the "sometimes not" case.

Not examined: chats shared with a project and handed over by another member (the draft drops their uploads by design, services/platform/app/features/chat/lib/chat-task-draft.ts:49-52), tasks made through the REST API, and the standard agent on the shared engine.

Constraints

  • A chat is personal unless shared; copying it into a task makes its content visible to everyone who can open the task. The draft already limits uploads to the creator's own for that reason.
  • Task descriptions are capped (TASK_DESCRIPTION_MAX), and attachments at 50.
  • The agent works in a sandbox without the person's session; a link into the app is not readable there.

Options (no preference)

  1. Put a short transcript (or the last N turns) into the description, editable in the dialog before the task is created.
  2. Attach the conversation as a file (Markdown) to the task, beside the uploads.
  3. Carry the assistant-made images and files as attachments too, alongside the person's uploads.
  4. Let the agent read the source chat through a tool, limited to what the task's creator could read when the task was made.
  5. Let the chat write a hand-over brief (a model summary) that the person reviews in the dialog.

Questions

  • What should a colleague who opens the task see of a personal chat it came from?
  • Should assistant-made files be carried by default, or offered as a choice in the dialog?

Related

Activity

  1. added
    priority: medium
    needs discussion
    bug
    service: platform
    on Nov 4, 2026
  2. yannickmonney commented on Nov 14, 2026

    @yannickmonney
    ContributorAuthor

    Decision

    A task made from a chat is self-contained and visible. Whatever its agent is given, everyone who can open the task sees too, and the person creating it sees and can edit all of it in the dialog first. The agent gets no hidden or live channel into the chat.

    Rule

    • Assistant-made files are carried by default. Images and files from generate_image, create_file and run_code ride along as task attachments next to the person's uploads. They are kept in conversation order, de-duplicated, and capped at the newest 50 overall. Each one can be removed in the dialog.
    • The description carries the earlier conversation. It reads: the last request, then an "Earlier in this chat" section, then the link to the chat.
      • The section holds the user's and the assistant's text only, labelled by speaker. Reasoning and tool calls are left out, and every file, uploaded or made, shows as a [file: name] marker.
      • The copied text is inert. An @handle in it is escaped, so creating the task mentions no one and starts no agent. A turn cut inside a code block has the block closed.
      • Limits: 2,000 units per turn, and at most 12,000 units for the section (less if that is all the room left under the description cap). When turns don't fit, the oldest whole turns are dropped and a line says how many were left out.
      • The request always wins over the transcript.
    • Only the chat's owner gets the transcript and the assistant-made files. This is the same rule that already holds back uploads. Someone reading a chat another member shared gets the request and the link, as today.
    • The dialog says who will see it. Near the description it states that everyone who can open tasks in the chosen project will see the description and the attachments.
    • What a task carries is written down. The hand-over note (handover.ts) and the spec state it.

    Answers

    • What should a colleague see of a personal chat? Exactly what the agent sees: the request, the bounded earlier conversation, the creator's uploads, the files the assistant made, and the link. The creator reviews all of it before the task is created.
    • Assistant-made files by default or by choice? By default. They are listed in the dialog's attachment list, and removing one there is the choice. They are the creator's own files, so they pass the task's ownership check, and files held back by the secret or PII scan still reach no workspace.

    Rationale
    Copying a personal chat into a task is a disclosure, so it should happen once, in front of the person, at a point where they can edit it. The copy must not act on its own: a task description's mentions notify people and start agents when the task is created, so mentions in the copied chat are escaped. A tool that reads the chat live (option 4) would give the agent context the task's readers cannot see, and would follow a chat that keeps changing after the hand-over. The two failures in the report are the earlier "deadline" message and the generated images, and both now reach the agent through channels every run already reads: the description and the attachments. A Markdown attachment (option 2) may never be opened and can't be reviewed in the dialog. A model summary (option 5) costs a model call and can drop the one fact that matters.

    Implementation units (base: main)

    1. S: carry assistant-made files in chat-task-draft.ts (owner only), update the hand-over sentence, add the spec rule, a manual box, and unit tests.
    2. M (after unit 1): add the earlier-conversation section with its limits, speaker labels, file markers, escaped mentions, closed code blocks and the omitted-count line; add the dialog's audience sentence in en/de/de-CH/fr, linked to the description field for screen readers; extend the hand-over note and the spec; add the KOLIBRI manual box.

    Cross-issue amendments (decisions taken together with #5365):

  3. added
    agent-ready
    and removed
    needs discussion
    on Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readybugpriority: mediumservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions