Repository navigation
feat(platform): hand a chat's work to a project agent in one step - #4023
Merged
Merged
Conversation
The app's chat send never carried a locale, so every app turn ran as English: the reply-language directive read "(en)" for a member whose interface is German, and anything a turn words from the catalogs could only be English. The send and the regenerate now carry the UI's language, as the arena and parked sends already did. It stays a default: the language the user writes in still wins, and only the REST door's locale pins the reply language. A locale is written into the system prompt, so every chat door now holds it to one BCP 47 tag shape (the REST door's pattern, shared): free text never reaches the instructions.
A Member who asked the chat for a file was sent to a project with no agent, or to a task that sat unstarted, and nothing in the chat said what became of the work. The hand-over now finishes: - Create task sits in the chat header; the conversation menu keeps it on narrow screens. - The project step lists the projects with agents first, with their count, says who could add one where there is none, and picks the only project that has agents. - The task dialog assigns a project's only agent. From a chat its main verb is Create and start agent, with Create only beside it; on the board, Create and start agent joins Create task whenever an agent is assigned. - A task names the chat it was handed over from (source_thread_id, migration 0144) when its creator can read that chat, and the chat shows a live row per task above its message box: the agent working, waiting for a sandbox slot, retrying, stopped, or ready for review with its files.
The assistant could only say "create a task and assign it to an agent", which sent a Member to a project without one and a tab they cannot change. Each app turn now carries a hand-over note after the cache breakpoint: which of the person's projects have an agent, whether they could add one, whether agents can start at all, and the controls as their interface names them, read from the app's own catalogs in the language the send carries. The deliverables rule gives what fits in a reply, then those steps, and never invents menus, projects or roles. Sub-agent turns and turns sent with an API key carry no note, and a failed read replies without one.
Chat basics, Tasks, Task automation and the Member projects tutorial describe the new hand-over in en, de and fr: Create task in the chat header, the project step's agent groups, Create and start agent, and the task's live row above the message box. The capture manifest opens the hand-over from the header and assigns an agent before the shot, and a new shot shows the task's row with the message box; both images are recaptured.
CHAT-F52 now follows the header's Create task and the one-step start. CHAT-F53 to CHAT-F55, CHAT-B20 and CHAT-A8 cover the task's live row and its states, the reply's hand-over steps, a hand-over with no agent anywhere, and the keyboard and screen reader; TASK-F59 covers Create and start agent on the board. The automation reference names the specs that own the rest, and the readme counts are current, including the conversations suite's two boxes from #3987.
The surface's send now carries the interface language (the fix before this one); the test that pins the send's exact fields names it too.
yannickmonney
force-pushed
the
feat/chat-task-handover
branch
from
October 1, 2026 04:00
8e3e616 to
50a2fc1
Compare
This was referenced Oct 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
This is PR B of three for the customer finding: a Member couldn't get a small job (three files and a prompt) done, because the chat pointed at an agent that never ran. PR A (#4017, merged) ended the dead ends after a task reaches an agent. This PR makes the hand-over from the chat finish. Reproduced live as a Member:
en, because the send never carried the interface language.What changes
A hand-over in one step
md, the ⋯ menu keeps Create task from chat.The chat follows the task
app.tasks.source_thread_id(migration 0144: a nullable column with a partial index) names the chat a task came from. It is set only when the creator can read that chat: their own, or one shared into a project they can open. Otherwise the create fails withTASK_SOURCE_THREAD_NOT_FOUND.GET /api/app/tasks/by-thread/:threadIdlists up to 10 tasks made from a chat, newest first, limited to those the reader can open. Each carries its run state (retry pending, waiting for capacity, failure code) and its output count.aria-live="polite".The assistant knows the way
A per-person
task-handoverblock after the cache breakpoint names:The DELIVERABLES rule now defers to it, and the persona stays under its 1,800-character guard. Sub-agent and API-key (REST) turns carry no note, and a failed read degrades to none. A person who can open no project gets a note saying who sets one up.
A server-side catalog reader (
backend/core/i18n/catalog.ts) is shared with the notification mirror.The interface language on every turn
localestill pins the reply language.localeTagSchema(BCP 47 shape, at most 20 characters), since the value is written into the system prompt.Decisions (flagging for review)
source_thread_idis not a foreign key: trashing a chat leaves its tasks as they are.Proof
lint:links,lint:manual,check-guide(chat, tasks), docs vitest and the@tale/uii18n tests all pass. The full platform server (966 files, 13,317 tests) and UI (559 files) suites are green.checkTaskSourceThreadpasses its 3 checks: the migration's column and index, who may name which chat, and the per-reader listing.chat-create-tasknow shows an assigned agent and Create and start agent, andchat-task-trayis new.Docs and manual
Not in this PR