Skip to content

fix(chat): name the agent when it refuses a message - #27946

Merged
brennanb2025 merged 2 commits into
mainfrom
brennanb2025/agent-didnt-accept-wording
Oct 12, 2026
Merged

brennanb2025 merged 2 commits into
mainfrom
brennanb2025/agent-didnt-accept-wording

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 9 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​12 $\color{#cf222e}{\Huge{\mathbf{−}}}$​18 $\color{#cf222e}{\Huge{\mathbf{−}}}$​6
Prod 11 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​81 $\color{#cf222e}{\Huge{\mathbf{−}}}$​56 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​25

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):

Before After
No reason given The provider did not accept this message. Codex didn't accept this message.
With the agent's reason The provider did not accept this message: thread not found. Codex didn't accept this message: thread not found.
Agent name unknown The provider did not accept this message. The agent didn't accept this message.

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 providerRejected failure now takes {{agent}}. It gets the agent the same way the sentences around it do (agent(say, context) in src/shared/agent-session-failure-words.ts, the same path stopRefused and providerExited use): 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.
  • Six locale catalogs and en-runtime-required.json: the two strings.
  • Tests that asserted the old sentence.

A separate first commit moves the six provider-retry translation pieces out of agent-session-failure-words-text.ts into 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 providerRejected keeps 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 src test files that mention this sentence, the failure kind, the failure-words table or the retry pieces (1083 tests), plus mobile/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

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

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

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

brennanb2025 and others added 2 commits October 12, 2026 02:40
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>
@coderabbitai

coderabbitai Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 858d9d79-4378-4513-822c-15e7bb38a7a1

📥 Commits

Reviewing files that changed from the base of the PR and between cfbf361 and 8075b6a.


📒 Files selected for processing (20)
  • mobile/src/session/MobileNativeChatQueuedMessages.test.tsx
  • src/main/codex/codex-structured-compaction-refusal.test.ts
  • src/main/codex/codex-structured-dispatch-admission.test.ts
  • src/main/codex/codex-structured-session-adapter.test.ts
  • src/main/codex/codex-structured-turn-steer.test.ts
  • src/main/native-chat/agent-session-journal/journal-reducer-rejection-fact.test.ts
  • src/main/native-chat/agent-session-wire/structured-conversation-compaction.test.ts
  • src/renderer/src/components/native-chat/NativeChatStructuredSession.approval-and-start-failure.test.tsx
  • src/renderer/src/components/native-chat/agent-session-failure-words-text.test.ts
  • src/renderer/src/components/native-chat/agent-session-failure-words-text.ts
  • src/renderer/src/components/native-chat/agent-session-provider-retry-words-text.ts
  • src/renderer/src/i18n/en-runtime-required.json
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/shared/agent-session-failure-copy.ts
  • src/shared/agent-session-failure-words.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.



📝 Walkthrough

Walkthrough

Rejection messages now identify the agent instead of using generic provider wording. Shared and localized messages retain the quoted detail placeholder. The shared rejection-word function and renderer translation pass the agent name. The renderer also imports provider retry translation functions from a new shared map. Tests now expect agent-specific wording.


Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 8075b

The rejection message now names the agent, with no identified issue requiring a fix before merge.

Pre-merge checks · Passed 5
Passed Passed checks (5 passed)
Check name Status Explanation
Title check Passed The title clearly and concisely describes the primary change: naming the agent when it rejects a message.
Description check Passed The description is detailed and covers the user impact, implementation, rationale, compatibility, testing, visual proof, and checklist. It references issue #27936 in the rationale, although the Linked…
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@brennanb2025
brennanb2025 merged commit 6af34a4 into main Oct 12, 2026
56 checks passed
@brennanb2025
brennanb2025 deleted the brennanb2025/agent-didnt-accept-wording branch October 12, 2026 21:33
OrcaWin added a commit that referenced this pull request Oct 12, 2026
…#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>
brennanb2025 pushed a commit that referenced this pull request Oct 12, 2026
…#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>
brennanb2025 added a commit that referenced this pull request Oct 12, 2026
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant