Skip to content

feat(platform): choose skills in chat and say why file work failed - #4963

Merged
yannickmonney merged 21 commits into
mainfrom
feat/chat-skills-and-files
Oct 14, 2026
Merged

yannickmonney merged 21 commits into
mainfrom
feat/chat-skills-and-files

Conversation

@yannickmonney

@yannickmonney yannickmonney commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #4937. Fixes #4938.

A person can now choose the skills a chat reply reads, per message or per conversation, and when chat cannot make a file it says why instead of failing silently or sending the person to a task.

Owner decisions (2026-10-13): both ways of choosing (/name per message and a Skills section per conversation); the symptoms seen were all four of #4938's ("told me to make a task", "steps failed / no file", "file didn't open", "slow or cut off"); the prompt stops claiming the document skills exist, with a follow-up issue for built-ins that never reach existing organizations (#4964); Auto picks the band from the message text alone, so neither a file request nor an attached document lifts it.

#4937: choosing a skill in chat

  • Per message. A message that starts with /name chooses that skill. Typing / at the start of the composer opens a list of the person's skills (Up/Down, Enter or Tab to complete, Escape to close; a listbox driven by aria-activedescendant, with the match count announced). The + menu has Use a skill, which starts one. One grammar serves every door (lib/skills/slash.ts): the composer, a REST content, and the turn reading the stored text back. A name that is not one of the person's skills stays text.
  • Per conversation. The model picker gains a Skills section. Skills checked there are read on every reply of the conversation, stored on the conversation's root in thread_metadata.capabilities.skills, an existing column (no migration). New routes: POST /api/app/chat/threads/:threadId/skills (owner only) and GET /api/app/chat/composer/skills (honours the Chat tools skills switch). Create-thread takes skills. The picker's button shows the count, and its label says it too.
  • What the turn does. Each chosen skill the person can see (at most 4) is read before the model answers, as a "Reading the docx skill" step that costs none of the model's steps. Every reply reads its chosen skills again, because the history keeps an earlier read only as a short copy. The reads happen before the context is fitted, so older turns give way to them and the first round's spend hold counts them. The pre-read is a load_skill call and result on the wire, the same shape as a model-made load, so it replays in later turns and branches like any other.
  • What the person sees. The bubble shows chosen skills as chips, while the stored text stays as typed. A chat is named from the words after the chosen skills' names, not "/xlsx Make a table"; a leading /word that chose nothing stays in the title.

#4938: making documents in chat

Symptom What was found Change
"Told me to make a task" When the work tools could not be set up (an unreadable Chat tools policy, a setup fault), they dropped out silently. The persona then said deliverables go to tasks, and basics.md said the same. The reply is stamped workToolsUnavailable (policy_unreadable or setup_failed), and the persona says file tools are unavailable right now. The person gets a notice naming the cause, and the docs no longer send files to tasks.
"Steps failed / no file" A sandbox that could not start reached the model as "run_code failed unexpectedly". A missing runtime image read as "busy, try again". A failed step showed a red icon and nothing else. Skills assume skill-relative script paths and save to the working directory, while run_code harvests only /agent/output. The prompt named docx/xlsx/pptx/pdf even where the library lacks them. Failures carry a reason: sandboxes busy, host busy, not ready, unreachable, failed, program failed, timed out. The step shows it in the person's language under the row, and screen readers get it as the row's description. Deadlines cancel the program and say so. load_skill maps a skill to the sandbox (paths under /agent/skills/<slug>/, save to /agent/output/, libraries preinstalled). read_skill_file falls back case-insensitively, and a run with no output lists what it left in the workspace. Tool descriptions mention only tools on offer, and the ladder no longer names skills that may not exist.
"File didn't open" A PDF preview whose file could not be read stayed on "Loading…" forever. A reply tried again could come back without its file: run_code skips an unchanged output it delivered before, even when the reply that showed it is no longer shown. The preview says it could not load the file. run_code attaches a file the code rewrote with the same bytes again when the conversation no longer shows the reply it came on, judged only when the whole conversation is in the turn's history. A file the code leaves alone is never attached again.
"Slow or cut off" The last round, after the tool budget, dropped the tool definitions while the history carried tool calls, which Anthropic answers with a 400. The incomplete-reply notice named raw tool ids. Auto lifted the band for documents. The final round keeps the tools with tool_choice: none on Anthropic (omits them on OpenAI and Responses, as before) and stops if the model still calls one. The notice no longer lists raw tool ids. Auto decides from the message text alone.

The owner's real prompts were not captured, so the table maps each symptom to the causes found by reading the code and on a local rig. It does not claim a reproduction of their sessions.

Docs, spec, manual

  • Docs EN/DE/FR: platform/chat/files-and-skills.md, platform/chat/basics.md, platform/workspace/skills.md, develop/api-reference.md (REST turns make files; /name chooses skills). A new screenshot, chat-skill-picker (the list a / opens), was captured through the pipeline and is shown on the chat page in all three languages.
  • Chat spec: CHAT-R28 to CHAT-R30, plus a reply tried again under CHAT-R24; tests carry the rule IDs.
  • Manual: CHAT-F73 to F77, CHAT-B27, CHAT-A11; skills.md no longer says chat does not use skills.
  • Comments and the skills empty state no longer describe chat as retrieval only.

Independent review

An adversarial review of the whole branch found one high, three medium and several low issues. All but two are fixed here, each with a test that fails on the code before it:

  • High: from the second reply on, a chosen skill reached the model only as the history's 400-character copy. Every reply now reads it again, within the window.
  • Medium:
    • The re-delivery rule attached files the code never touched (after an edit, and across a model comparison's columns). It now applies only to files the code rewrote.
    • A task run no longer waited while the sandbox host prepared its image. It waits again.
    • The pre-read wasn't counted against the context window or the spend hold. It is now.
  • Low:
    • The / typeahead pattern backtracked for seconds on a pasted list of paths (measured). It now reads in linear time.
    • Enter on a fully typed name was swallowed and left the caret jumping.
    • A comparison started from a new chat dropped its skills.
    • A chat missing from the sidebar list kept the last chat's skills.
    • Titles dropped any leading /word, not just chosen skills.

Not in this PR

  • REST callers don't see workToolsUnavailable yet: the REST message usage passes a fixed list of keys, and adding one changes the API contract (a version bump). Follow-up.
  • Not verified: Gemini 3 over the OpenAI-compatible wire may require thought signatures on function calls in the current turn. The pre-read's synthetic call has none, and neither do replayed calls anywhere in chat_wire.ts. One live check on a gemini-3 model would settle it.
  • Built-in skills never reach organizations that already exist: Decision: how should built-in skills reach organizations that already exist? #4964.
  • Decision: should "explicit use only" skills be enforced by the platform, or stay advice to the model? #4872: explicit-only skills are still enforced by the prompt alone. A skill the person chose counts as named by them.
  • The four document skills ship with Anthropic's LICENSE.txt (all rights reserved; no reproduction, derivative works or distribution outside the Services). This PR leaves the bundles untouched and fixes the mismatches on the platform side. The license itself is the owner's to weigh. This is not legal advice.

Verification

  • Format, oxlint (type-aware), tsc (platform, ui), knip, conflict markers, lint:links, lint:manual: clean.
  • Server + PII suite: 89,175 passed. Its one failure was lib/engine/core/record/travels.test.ts's 50 ms timing bound at load average 37; that module is untouched and the file passes alone. UI suite: 8,214 passed. Its 6 failures are all in sandboxes-settings.stop-task.test.tsx, which this branch does not touch: main's own, fixed by fix(platform): keep sandbox row menus open and settle the connect audit #4961. @tale/ui unit tests and the browser tests of the touched components (composer, picker search list, message thread, mention textarea, target size): passed. Docs tests: 716 passed.
  • Live, on a local stack (mock model gateway, a real sandbox spawner, real Postgres):
    • / typeahead: opens, filters, Up/Down, Enter completes /xlsx , Escape closes.
    • The chip in the bubble, and "Reading the xlsx skill" before the reply.
    • The picker's Skills section stays open while toggling; the choice is saved on the conversation, read on the next reply ("Reading the docx skill"), and stored when a new chat is created with it.
    • + → Use a skill works.
    • With the spawner stopped, the failed step reads "The sandbox service can't be reached", described to screen readers.
    • With it back, the file card appears, and Try again keeps the file.
    • With the policy file broken, the notice reads "Files couldn't be made in this reply because your organization's Chat tools policy can't be read."
  • Not observed live: re-delivery of byte-identical output (openpyxl stamps times, so the rig's spreadsheet changed between runs; covered by unit tests), the PDF preview failure (unit test), and the German and French strings on screen (i18n guards only).

No migration and no API contract change: the OpenAPI change is description text, outside the contract fingerprint.

An attached document no longer lifts Auto to the standard band: the
text decides, and an attached image still narrows the pool to models
that can read images. The pick's log line drops its doc-attachments
note, and the Models page says what Auto reads in EN, DE and FR.
Making documents in chat failed in ways nobody could see:

- A light sandbox that could not start reached the model as "run_code
  failed unexpectedly", and a host without its runtime image read as
  busy. Start failures are now unavailable with a reason (not ready,
  unreachable, failed, lost); the spawner's 429 keeps its refusal code.
- A program that ran past the platform's deadline was neither cut off
  nor named; a failed or timed-out run now carries a reason too.
- A run that saved its file to the working directory, as the document
  skills' examples do, attached nothing; the note now names the files
  left there. A loaded skill's usage maps it onto the light sandbox,
  and read_skill_file finds FORMS.md beside forms.md.
- The persona named docx, xlsx, pptx and pdf even where the library
  lacked them, and descriptions pointed at run_code where code was off.
- Tools that could not be set up (an unreadable Chat tools policy, an
  unresolved member, a setup error) left the no-files persona telling
  the person to make a task; the reply now carries the reason and a
  persona that says files cannot be made in this reply.
- The round after the tool budget dropped the tool definitions, which
  Anthropic refuses beside earlier tool calls; it keeps them with
  tool_choice none, and runs no call made after the budget.
- A reply tried again got no card for a file whose bytes were unchanged;
  a delivery counts only while the conversation still shows it.
A failed step only turned its icon red, and its reason was raw model
JSON behind the disclosure. Its outcome now reads on the line below in
the person's language (no light sandbox free, the program ran out of
time, stopped, not found) and describes the step's button for screen
readers. A reply whose file tools were missing says why under it, the
couldn't-be-completed notice points at the steps instead of naming raw
tool ids, and a PDF preview that cannot load says so instead of
loading forever. EN, DE and FR.
A skill reached a chat only when the model decided to load it. Now a
person chooses: a message that starts with /docx (or /xlsx /brand-voice)
names its skills, and a conversation can use skills on every reply,
kept on its root (thread_metadata.capabilities, which branches and an
arena column already copy). Before the model's first round the turn
reads each chosen skill the conversation does not already show read,
with a load_skill call recorded on the reply like the model's own, so
it costs no model round and the step shows it; the prompt names the
choice. Only skills the person's library holds count, at most four;
anything else stays text. The same /name works in a REST message's
content. Routes: POST /threads/:id/skills, skills on thread creation,
GET /composer/skills (empty while Chat tools > Skills is off).
Typing / at the start of a message, or Use a skill in the + menu, opens
the skills the person may use; Up/Down move, Enter or Tab write /name,
Escape closes, and a name nobody has stays text. The picker's Skills
section sets the conversation's skills (up to four), kept on its root
and carried into a new chat's first send; its trigger counts them. A
sent message shows the skills it chose as chips. All of it is hidden
while Chat tools > Skills is off. The listbox is the one the mention
field already drew, now shared as @tale/ui/typeahead-listbox. EN, DE
and FR.
The chat docs (EN, DE, FR) tell a person to type / or use the + menu
for one message and the picker's Skills for a conversation, say a
failed step names its cause and a reply says when its file tools were
missing, and drop the sentence that sent every file to a task. The API
reference says REST turns make files and read the skills /name chooses.
The chat spec gains CHAT-R28 to CHAT-R30 and a reply tried again under
CHAT-R24; the manual suite gains CHAT-F73 to F77, B27 and A11, and the
skills suite no longer says chat does not use skills.
Comments and the skills empty state still described chat as a reader
of documents alone, in the tool table, the image policy, the config
registry, the chat data seam, the + menu and matplotlib's read-only
home. They now say what chat does since it makes files and reads
skills. EN, DE and FR.
An option's accessible name was its whole text, so a skill in the
composer's / list was read out with its full description, several
hundred characters per arrow press. The name now names the option and
the caption follows it as the option's description.
A chat that opened with "/xlsx Make a table" was named after the
whole message, so the list read "/xlsx Make a table". The title model
and the fallback title now take what the message says after the skill
names it starts with; a message of nothing but names keeps them.
The picker's button shows a book and a count when the conversation
reads skills, but its label hid both from a screen reader. The label
now ends with the count, as the Skills section does.
The skill names joined the sent-image previews as something a message
row reads from the surface, and wrapping the whole surface in a second
provider re-indented five hundred lines. One small provider now holds
both at the depth the first one had.
run_code attaches an unchanged file again when the conversation no
longer shows the reply it came on, the way a reply tried again needs.
The turn judged that from its history, which a long chat trims to a
window, so every file delivered above the window would have come back
on each run. Past a trimmed history the turn no longer says which
files are shown, and run_code keeps to what it delivered.
The chat docs (EN, DE, FR) describe choosing a skill with / but showed
nothing of it. The capture manifest gains chat-skill-picker, a new chat
with / typed and the person's skills listed above the box, taken
through the pipeline; the pages show it under the paragraph.
A reply skipped a chosen skill the conversation showed read already,
but the history keeps a tool result only as a short copy, so from the
second reply on the model worked from a 400-character stub of the
skill. Every reply now reads its chosen skills again, before the
context is fitted: the history makes room for what they hold, and the
first round's hold counts it. Spec, docs (EN, DE, FR) and CHAT-F75 say
so.
The title job dropped any leading /word, so "/api returns 500 on
login" was named from "returns 500 on login" for people who never
chose a skill. The turn now hands the title the message's words after
the names of the skills it chose, and every other name stays; the
title job and the fallback title take the words as given again.
run_code attached an unchanged file again whenever the reply it came
on was not shown, so a file the program never touched came back: after
an edited message every file of the replies below it, and in a model
comparison each column's files on the other's every run. A file the
code leaves alone is never attached again now; one it rewrites with
the same bytes still comes again when its reply is no longer shown.
…mage

A host still preparing its runtime image now reads as not ready rather
than busy, and the lane that waits for a light sandbox (a task run)
waited only on busy, so a task started right after a sandbox deploy
gave up on code at once. It waits for a host preparing its image too,
as long as its host asks.
The pattern that found the /name at the caret could split the spaces
between names many ways, so a pasted list of paths took seconds per
keystroke and froze the tab. The composer now reads name by name with
sticky patterns, in time linear in the text.
Enter on a skill name already written in full changed no text, so no
render followed: the key was swallowed, the list stayed open, and the
caret jumped on the next edit. Such a pick now moves the caret past
the name at once and closes the list.
A chat whose row the list does not hold never loaded its skills, so
the picker kept the last chat's, and one toggle saved them onto it;
a comparison started from a new chat dropped the skills chosen for it.
Skills now load from the chat's own read when the list lacks it, show
none until one answers, and go with the conversation a comparison
creates.
The checks ran against a main whose sandbox queue-cap test timed out on
CI runners; #4969 gave it room, and a re-run would test the old merge.
@yannickmonney
yannickmonney added this pull request to the merge queue Oct 13, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 13, 2026
@yannickmonney
yannickmonney added this pull request to the merge queue Oct 13, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 13, 2026
@yannickmonney
yannickmonney added this pull request to the merge queue Oct 13, 2026
@yannickmonney
yannickmonney removed this pull request from the merge queue due to a manual request Oct 14, 2026
@yannickmonney
yannickmonney merged commit 7295632 into main Oct 14, 2026
@yannickmonney
yannickmonney deleted the feat/chat-skills-and-files branch October 14, 2026 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant