Repository navigation
fix(chat): name the agent when it refuses a message - #27946
Conversation
Pure move of the six provider-retry translation pieces out of agent-session-failure-words-text.ts, which sits at the 300-line limit. No key or behaviour change. Co-Authored-By: Claude <noreply@anthropic.com>
"The provider did not accept this message" becomes "{{agent}} didn't
accept this message" ("The agent" when the name is unknown), in English
and every locale. The providerRejected failure kind is unchanged.
Co-Authored-By: Claude <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The rejection message now names the agent, with no identified issue requiring a fix before merge. Pre-merge checks ·
|
…27875) * fix(browser): annotation card and outline follow the selected element The grab overlay keeps re-measuring the picked element after the click (scroll in any box, resize, element size changes), and the isolated viewport bridge reports that live box so the pending card follows it, including page zoom. The card's side pick uses its measured height. * fix(browser): bind annotation card to selected element * fix(browser): keep document annotation card on selection * fix(ci): point the main sync-spawn ratchet at the shared ratchet library (#28054) #27756's script imported baseline helpers from check-focus-read-ratchet.mjs after #27788 had moved them into ratchet-baseline.mjs, so it crashed on start and failed every PR that merges main. Use the library's helpers, and record the two daemon-process launches from #27769 that the broken check never saw. Co-authored-by: Orca Worker <orca-worker@localhost> * fix(browser): follow selected element outer-box size * refactor(chat): give the start-refusal resumable table its own module (#28085) #27946 and #26684 together put agent-session-failure-words.ts at 304 lines, over max-lines, which fails lint and the pre-commit hook on every merge of main. The refusal-code table is standalone with one reader, so it moves out. Co-authored-by: Orca Worker <orca-worker@localhost> --------- Co-authored-by: OrcaWin <alpha-eng@stably.ai> Co-authored-by: Orca Worker <orca-worker@localhost>
ELI5
If an agent turns down a message you sent from a chat, the line under that message said "The provider did not accept this message." "The provider" is Orca's internal word for whichever agent runs the chat, and nobody using the chat calls it that. Now the line names the agent: "Codex didn't accept this message."
What Changed
Problem. A message can come back unsent when the agent itself refuses it: for example, Codex can't find the conversation, or Claude won't take an image type. The line that explains this said "The provider did not accept this message" (or "...: <the agent's own reason>."). It names an internal concept instead of the agent, unlike every other failure line around it ("Codex couldn't start.", "Claude didn't stop.").
Before / after (desktop and phone):
Desktop shows it in your language (es, fr, ja, ko and zh are translated). The phone shows it in English: under the message box it prints the sentence the host wrote, and on a returned queued card it builds the same sentence itself with the agent's name.
Mechanism. The sentence for the existing
providerRejectedfailure now takes{{agent}}. It gets the agent the same way the sentences around it do (agent(say, context)insrc/shared/agent-session-failure-words.ts, the same pathstopRefusedandproviderExiteduse): the chat's agent name when the writer knows it, otherwise "The agent". Only the wording changed:src/shared/agent-session-failure-copy.ts: the two English sentences.src/shared/agent-session-failure-words.ts: pass the agent into the sentence.src/renderer/.../agent-session-failure-words-text.ts: the desktop translation of the no-reason sentence now receives the agent value too.en-runtime-required.json: the two strings.A separate first commit moves the six provider-retry translation pieces out of
agent-session-failure-words-text.tsinto a sibling file,agent-session-provider-retry-words-text.ts. It changes no keys and no behaviour. It's needed because that file was already at the 300-line limit and the change above adds four lines. The split follows how the file already brings in its attachment and sign-in pieces from sibling files.Why
This is the smallest change that gives the line plain words and names the agent, which is how failure lines in chat should read. The failure kind
providerRejectedkeeps its name: it's a published identifier in what the host and clients exchange, and renaming it would break mixed-version pairs for no visible gain. Nothing else changed. When an agent refuses a message, the detection and handling are the same, and no other sentence changed.Follows #27936 (the phone keeps a not-sent message in place). That PR intentionally changed no wording. The two are independent and can land in either order.
Compatibility with older clients. The failure kind and the shape of what's sent between host and client are unchanged. An older desktop or phone that prints the host's sentence as written will show the new English sentence, which is the intended result. Places that build the sentence from the failure kind (an older desktop in any language, and an older phone's returned queued cards) keep the old "The provider did not accept this message" until that client updates.
Linked Issue
None. Maintainer follow-up to #27936.
Visual Proof
N/A: a text-only change to one existing line, which appears where it did before. The exact sentences are asserted in the unit tests listed below. No screenshots were taken.
Testing
Typecheck: web, node and CLI projects.
Localization:
verify-localization-catalogs,verify-localization-extraction,audit-localization-coverage --check.Vitest: all 73
srctest files that mention this sentence, the failure kind, the failure-words table or the retry pieces (1083 tests), plusmobile/src/session/MobileNativeChatQueuedMessages.test.tsx.The repo's CI static checks: lint, code quality and formatting pass.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Review
Agent skill upstream boundary
Notes
Security: none. Cross-platform: text only. Remote SSH: the host writes the sentence and the agent name comes from the same context the neighbouring sentences use. Mobile: the host's English sentence under the message box, and the phone's own English sentence (with the agent's name) on returned queued cards. Backwards compatibility: covered above. Performance: none.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)