You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Agent conversations: route by where a request was made, not who asked - #46759
An agent used to handle the same request differently depending on who asked. Now it follows one rule: every place (an Orca chat, a Slack thread, a Slack DM, a Linear issue, a GitHub PR) is its own chat, the agent sees all of its own work wherever it is, and answers go back to where the request came from.
Files
Added
Deleted
Net
Test
1
$\color{#1a7f37}{\Huge{\mathbf{+}}}$24
0
$\color{#1a7f37}{\Huge{\mathbf{+}}}$24
Prod
20
$\color{#1a7f37}{\Huge{\mathbf{+}}}$109
$\color{#cf222e}{\Huge{\mathbf{−}}}$222
$\color{#cf222e}{\Huge{\mathbf{−}}}$113
What Changed
Each change removes a check on who asked. No new check is added.
Automations run in the chat they were made from. With no --runs-in, a recurring automation made from a chat other than the Home Chat now runs in that chat, whoever asked. Before, only a teammate's did; the owner's started a new conversation each run. Waits already worked this way. Automations already saved keep their target; only new defaults change (runs-in-caller-chat.ts).
The agent's other chats and live work are shown to every turn. The "your other chats" note and the live-work note (items needing you, items in progress, running workers) were left out unless the turn acted for the owner alone. A teammate's turn, or a Home Chat turn a teammate's request woke, could not see a worker already on the same job, and started another. Both notes now go to every turn, and neither read looks up who the turn is for any more (bot-recent-chats.ts, bot-active-work-read.ts, bot-turn-ended.ts).
Answers show where the request was made. The card that shows "sent to X" and its answer was written only when everyone who asked was the owner. It is now written in the sending chat unless that turn is answering a connector conversation (a Slack, Linear or GitHub thread, which gets the answer as the agent's reply there). The check reuses the askedInConversation record field each request already stores, so the sender's instructions and the card always agree. When the sending turn was itself answering a request from another chat (say, a teammate's thread asked the Home Chat, which asks another agent), the agent is still told to pass the answer back in its reply, keyed on that request (a new answersRequest record field) rather than on who asked (bot-request-view.ts, bot-request-owner-card.ts, bot-request-send.ts, bot-request-record.ts).
new-chat works from the Home Chat whatever started the turn. It no longer requires the latest message to be one the owner typed in Orca, so asking from Slack works too. It still runs only from that agent's own Home Chat. The instruction to run it only when the owner asks is unchanged (bots.ts).
Items closed from any chat go into the memory journal. Before, items closed in a teammate's chat (or in an old event run with an unknown causer) were left out, so a later "what did you do for Dana's release?" found nothing (bot-memory-journal-runtime.ts).
Instruction text that changes (agents read these)
src/main/bots/bot-preamble.ts line 63, before:
When you create or change an automation, tell your owner where it runs (a new conversation each time, this chat, or your Chat; one a teammate asks for runs in their chat) and where its results go.
After:
When you create or change an automation, tell your owner where it runs (a new conversation each time, this chat, or your Chat; a recurring one made from a chat other than your Home Chat runs in that chat unless told otherwise or it answers in a thread or runs on its own agent, which take a new conversation) and where its results go.
--runs-in help (src/cli/specs/automations.ts line 80) and the matching CLI skill guide (skill-guides/orca-cli/references/automations.md line 80, bundle regenerated). The changed clause, before:
except that one a teammate asks for from their chat runs in that chat, so its results reach them there
After:
except that one made from a chat other than its Home Chat runs in that chat, so its results reach whoever asked there
The skill guide's clause changes the same way and keeps its "(… Chat once that chat is closed)" note.
Why
Each check sent the same command or request to different places depending on who typed it. That cost real work: duplicate workers on a job a teammate asked about, answers written out "for Dana" in a chat Dana never reads, an owner's "post it here every morning" landing in a new conversation, and memory with no record of teammates' work. None of these checks protected anything. Teammates are already trusted to ask, and the same data was readable through orca bot chats, orca bot items and orca bot work list. Keying on the place a request came from gives one rule for every place.
Checks that do protect against outside parties are untouched: Who can ask, approval routing, Slack mirror defaults, marking event text as content, and refusing requests from other owners' agents.
Linked Issue
N/A (maintainer change).
Visual Proof
N/A: no UI changes. What changes is the text an agent is given and where its replies and cards go; the tests below pin each change.
Testing
Automated tests added/updated, or explained why not below
Main has since cut the test suite to invariant tests (#46786), which deleted every test file this PR had changed, so the PR's only test is the new bot-request-record.test.ts: a turn that took status mail and a question answers the question, and fails on the code before it. Locally on the merged tree: the Node typecheck, oxlint and oxfmt on the changed files, and the owner-DM reply tests main kept (external-conversation-legacy-replies.test.ts, connector-reply-restart-matrix.test.ts) with one worker.
The owner's Slack DM reply rule (words before NO_REPLY are still posted there, #47045) is unchanged by this PR.
Performance
Less work per turn: the other-chats and live-work reads no longer read the turn's record and acts-for rows first, and the other-chats read no longer looks up each chat's acts-for row. Nothing new runs. The only added work is that teammate turns now get the two notes owner turns already got: the same bounded, time-limited reads, with live work still cached per agent for 15 s.
Risk
Level: Medium
Agents give teammates' turns more context (other chats, live work). That information was already readable through the CLI, and it stays fenced as content.
Stored data and the protocol are unchanged: no fields, flags or methods are removed, and saved automations keep their target. A plain revert undoes everything; journal lines already written for teammate-chat items stay.
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.
Checklist
I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
I stated the risk: what could break, for whom, and how to back it out
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): no platform-specific code. Remote hosts and paired servers run the same host code.
An automation made from a chat other than the Home Chat now runs in that chat
whoever asked, like waits already do; saved automations keep their target.
Items closed from any chat now join the memory journal.
…asked
Other-chats and live-work notes go to every turn, whoever asked. A request's
card shows in the sending chat unless that turn answers a connector
conversation. New Home Chat works from the Home Chat whatever started the
turn. The owner's DM is quieted by the marker like any thread.
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.
Active-work, journal, and recent-chat reads no longer use owner or asker identity filters. Request records capture conversation context and whether a turn answers another request, and request-card placement uses those fields. Recurring automations from a bot chat outside Home Chat use that chat under the default run-location behavior. Home Chat reset checks for bot callers use bot identity and current session.
Merge Risk: Low · previous review eb37a
Automation guidance may tell the owner a cross-bot recurring automation runs in the originating chat when it actually starts a new conversation. This is a small text mismatch and does not block merging, but it should be corrected.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title states the main change: agent conversation routing now depends on where a request was made rather than who asked. The changeset removes owner/teammate checks across automation run location, …
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description check
The PR description follows the template's main sections (ELI5, What Changed, Why, Visual Proof, Testing, Performance, Risk, Agent skill upstream boundary, Checklist) and covers the change in detail. I…
Full details: Title check
Explanation
The title states the main change: agent conversation routing now depends on where a request was made rather than who asked. The changeset removes owner/teammate checks across automation run location, recent-chat and active-work reads, request card routing, and new-chat, which matches the title. It is specific and concise, and it does not describe unrelated work.
Full details: Description check
Explanation
The PR description follows the template's main sections (ELI5, What Changed, Why, Visual Proof, Testing, Performance, Risk, Agent skill upstream boundary, Checklist) and covers the change in detail. It explains the before and after behavior, the mechanism (removal of per-asker checks, new answersRequest field), the rationale, the test situation, the performance impact, and the risk level with a revert path. Gaps: the Linked Issue section says N/A (maintainer change) rather than linking an issue, which the template marks as required for outside contributors; the AI Disclosure section is absent; the Review and Notes sections are absent; and the Testing section ticks the manual-testing box is not checked, though it describes local verification. These gaps are non-critical for a maintainer PR, so the description is mostly complete.
Finishing Touches
Fix failing CI checks
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.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
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
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.
ELI5
An agent used to handle the same request differently depending on who asked. Now it follows one rule: every place (an Orca chat, a Slack thread, a Slack DM, a Linear issue, a GitHub PR) is its own chat, the agent sees all of its own work wherever it is, and answers go back to where the request came from.
What Changed
Each change removes a check on who asked. No new check is added.
--runs-in, a recurring automation made from a chat other than the Home Chat now runs in that chat, whoever asked. Before, only a teammate's did; the owner's started a new conversation each run. Waits already worked this way. Automations already saved keep their target; only new defaults change (runs-in-caller-chat.ts).bot-recent-chats.ts,bot-active-work-read.ts,bot-turn-ended.ts).askedInConversationrecord field each request already stores, so the sender's instructions and the card always agree. When the sending turn was itself answering a request from another chat (say, a teammate's thread asked the Home Chat, which asks another agent), the agent is still told to pass the answer back in its reply, keyed on that request (a newanswersRequestrecord field) rather than on who asked (bot-request-view.ts,bot-request-owner-card.ts,bot-request-send.ts,bot-request-record.ts).new-chatworks from the Home Chat whatever started the turn. It no longer requires the latest message to be one the owner typed in Orca, so asking from Slack works too. It still runs only from that agent's own Home Chat. The instruction to run it only when the owner asks is unchanged (bots.ts).bot-memory-journal-runtime.ts).Instruction text that changes (agents read these)
src/main/bots/bot-preamble.tsline 63, before:After:
--runs-inhelp (src/cli/specs/automations.tsline 80) and the matching CLI skill guide (skill-guides/orca-cli/references/automations.mdline 80, bundle regenerated). The changed clause, before:After:
The skill guide's clause changes the same way and keeps its "(… Chat once that chat is closed)" note.
Why
Each check sent the same command or request to different places depending on who typed it. That cost real work: duplicate workers on a job a teammate asked about, answers written out "for Dana" in a chat Dana never reads, an owner's "post it here every morning" landing in a new conversation, and memory with no record of teammates' work. None of these checks protected anything. Teammates are already trusted to ask, and the same data was readable through
orca bot chats,orca bot itemsandorca bot work list. Keying on the place a request came from gives one rule for every place.Checks that do protect against outside parties are untouched: Who can ask, approval routing, Slack mirror defaults, marking event text as content, and refusing requests from other owners' agents.
Linked Issue
N/A (maintainer change).
Visual Proof
N/A: no UI changes. What changes is the text an agent is given and where its replies and cards go; the tests below pin each change.
Testing
Main has since cut the test suite to invariant tests (#46786), which deleted every test file this PR had changed, so the PR's only test is the new
bot-request-record.test.ts: a turn that took status mail and a question answers the question, and fails on the code before it. Locally on the merged tree: the Node typecheck, oxlint and oxfmt on the changed files, and the owner-DM reply tests main kept (external-conversation-legacy-replies.test.ts,connector-reply-restart-matrix.test.ts) with one worker.The owner's Slack DM reply rule (words before
NO_REPLYare still posted there, #47045) is unchanged by this PR.Performance
Less work per turn: the other-chats and live-work reads no longer read the turn's record and acts-for rows first, and the other-chats read no longer looks up each chat's acts-for row. Nothing new runs. The only added work is that teammate turns now get the two notes owner turns already got: the same bounded, time-limited reads, with live work still cached per agent for 15 s.
Risk
Level: Medium
Agent skill upstream boundary
Checklist
N/Awith reason