Skip to content

perf(mobile): reuse the owned agent directory for Codex voice - #9289

Merged
klopez4212 merged 3 commits into
mobile-codex-huddle-20261108from
codex-voice-one-inventory-read
Nov 9, 2026
Merged

klopez4212 merged 3 commits into
mobile-codex-huddle-20261108from
codex-voice-one-inventory-read

Conversation

@brow

@brow brow commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

Targets mobile-codex-huddle-20261108 (#9269).

Opening a one-to-one agent DM already loads the owner's agent directory (ownedAgentDirectoryProvider, used by the compose bar and mention candidates). It reads the kind 30177 inventory, verifies each registration and profile, and keeps each agent's runtime. The Codex voice check added a second and third inventory read on top of that: loadMeAgentInventory with a runtime filter, then a forced refresh of meAssistantsProvider, which reads the inventory again plus profiles and the archive list. Each one ran again on every reconnect.

This derives Codex voice eligibility from the directory that's already loaded, minus desktop's known-archived agents (the cached meArchivedAgentsProvider, as before). Voice adds no inventory read.

  • The live kind 30177 subscription now invalidates the shared directory, so a desktop runtime change still reaches the phone without a reconnect, and mentions pick it up too.
  • Call start, recovery and the invite confirmation still reread fresh evidence: they invalidate the directory and wait for it.
  • The runtime: filter on loadMeAgentInventory has no caller left, so it's removed and that file matches main again.

Validation

  • Changed test: the voice discovery test now reads through the real directory provider and asserts the DM's directory and voice eligibility share one inventory read, then still follows desktop add, runtime change and removal without reconnect. The test for the removed runtime filter is deleted.
  • Full mobile test suite and flutter analyze pass.
  • Not run in the app: a real Codex huddle needs a desktop hosting the agent. This only changes where eligibility is read from; the huddle widget journeys in channel_detail_page_test.dart still pass.

🤖 Generated with Claude Code

An agent DM already loads the owner's agent directory, with each agent's
runtime, for mentions. Derive Codex voice eligibility from it instead of
two more inventory reads per evaluation and reconnect. Drop the unused
runtime filter on loadMeAgentInventory.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Tom Brow <[email protected]>
@brow
brow requested a review from a team as a code owner November 9, 2026 17:40
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-09T17:44:18.768590Z 740bc1e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 740bc1e7c0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

square-tomb and others added 2 commits November 9, 2026 09:47
Voice admission now waits on this read, so a relay that never ends
pagination must fail it rather than hang. Use the 50-page budget the
inventory loader already had.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Tom Brow <[email protected]>
Call start, recovery and the invite confirmation rechecked the owned
directory but kept a cached archive list, so a newly archived agent could
still be invited.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Tom Brow <[email protected]>
@klopez4212
klopez4212 merged commit 59726da into mobile-codex-huddle-20261108 Nov 9, 2026
45 checks passed
@klopez4212
klopez4212 deleted the codex-voice-one-inventory-read branch November 9, 2026 18:03
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.

3 participants