Repository navigation
Description
Summary
When the chat's propose_project_settings or read_project_settings refuses a request (a name the project already uses, a project the person cannot change, a model nobody may use), the reply shows a failed step whose line says only Couldn't run as asked (German So nicht ausführbar, French Impossible à exécuter tel quel). The reason is in the step's expanded detail, as the English sentence the tool wrote for the model. A German or French reader only learns why if the model repeats it in its reply. #5363 left this open (epic #5371).
What the code does today (train a32fb1586, not yet on main)
- The settings tools answer every refusal with
refused(message, closest?), which returns{ status: 'invalid_args', message }with no reason code (services/platform/backend/domains/chat/proposals.ts:109-115). Its 29 call sites write English sentences addressed to the model, for example`${project.name} already has an agent called ${name}.`(:776,:884) or'The person cannot create projects: an Editor or an Admin can.'(:563). - The line under a failed step's title comes from
stepOutcomeLabel. It uses areasonthe result names (only sandbox causes have keys,FAILURE_REASON_KEYS), else the status (invalid_args→thinking.outcome.invalidArgs) (services/platform/app/features/chat/utils/activity-label.ts:194-241). Its doc comment states the split: "The model's own message stays in the step's detail; this is the person's line." - The expanded detail shows the result's
messagefirst, then the rest of the result as JSON (services/platform/app/features/chat/components/thought-timeline.tsx:323-362). - A refusal at Apply is already localized. The card maps the service's error code to one of ten reasons (
PROPOSAL_FAILURES,services/platform/lib/chat/settings-tools.ts:231-251;proposalFailureOf,proposals.ts:1217-1237) and shows the catalog's sentence (services/platform/app/features/chat/components/settings-proposal-cards.tsx:126,:324).
What was observed
In the browser pass of 2026-11-05 (German and French UI, scripted mock model), a proposal for an agent name the project already had produced a failed step whose detail read "CA Verify already has an agent called Proofreader." in English, in both languages. Every other string of the flow was translated.
Not examined: what real models write in their reply after such a refusal. The scripted model does not explain.
Constraints
- The sentence is also what the model reads to retry or to ask the person, so it must stay explicit for the model, and so must the
closestname lists. - New sentences land in en, de and fr (and de-CH where it differs).
- The step detail is the call's raw input and output for every tool. These two tools should not read differently from the rest without a reason.
Options (no preference)
- Give each refusal a reason code, reusing
PROPOSAL_FAILURESwhere one fits (nameTaken,keyTaken,forbidden,archived,model,skills,limit) plus new ones (for example out of scope, ambiguous name, unknown name).stepOutcomeLabelthen shows a localized line for them, as it does for sandbox causes. - Show a refused proposal as a card too ("Not proposed", with the localized reason), so it reads like a refusal at Apply.
- Write the tool's sentence in the conversation's language. The model reads it either way.
- Keep it as it is: the detail is the raw tool answer by design, and the model's reply explains in the reader's language.
Questions
- Is a step's detail meant for the person, or only a trace of what the model saw?
- Should other tools'
invalid_argsrefusals follow what is chosen here?
Related
- feat(platform): create and configure projects and agents from the normal chat #5363, Epic: projects and agents in chat — choose them, talk to them, set them up, and show generated images once #5371
- Improvement: most sandbox failures don't say what went wrong — general or misplaced sentences on tasks, automation runs and chat tools #5360 (sandbox failures' sentences)
Activity
yannickmonney commentedon Nov 14, 2026
Decision
Option 1: reason codes. Every settings-tool refusal the person can act on carries a machine-readable
reasonnext to the unchanged Englishmessage(andclosest). The line under a failed step (stepOutcomeLabel) shows that reason in the reader's language, the same way it already does for sandbox and web-read causes.The rule
refused(message, { reason?, closest? })inproposals.ts.FAILURE_REASON_KEYS:out_of_scope,ambiguous_name,unknown_name,forbidden,managed_agent,name_taken,key_taken,archived,model_unavailable,skill_unavailable,skills_limit,agent_limit,no_change.ProjectError, its code maps throughproposalFailureOf(). A refusal then reads the same whether it happens when the chat proposes or when the person clicks Apply.Questions
invalid_argsrefusals follow? Yes, as a convention written into the chat spec, not as a sweep now. A tool whose refusal a person can act on names areasonfrom the shared vocabulary, with strings in every locale. Malformed-argument refusals name none.Rationale
The step line is already the person's channel, and it is already localized through reason keys (#5360). This extends one existing mechanism instead of adding a second one. The model keeps its explicit English sentence and the
closestlists it needs to retry.Implementation units
ProjectErrormappingFAILURE_REASON_KEYSentriesSETTINGS_REFUSAL_REASONSto the keys and localesbun run checkis green.