Repository navigation
feat(native-chat): Codex chats list and run the skills Codex loaded - #30937
Conversation
A Codex chat's skill list now comes from Codex itself (`skills/list`), live while the chat runs and refreshed when Codex says its skills changed, and from a short-lived Codex check while the chat is at rest. Plugin skills keep Codex's `plugin:skill` names, disabled skills drop out, and each skill file is its own row. A skill picked from the list reaches Codex as that exact skill, beside the unchanged `$name` text, on hosts that take it.
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: 🔵 Low · up to
|
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
fb52754f-8c7e-48c5-8ab2-9aa6795d8fbe
📒 Files selected for processing: 42
mobile/src/session/use-mobile-structured-session-commands.tssrc/main/claude/claude-at-rest-commands.tssrc/main/codex/codex-app-server-session.tssrc/main/codex/codex-at-rest-skills-probe.test.tssrc/main/codex/codex-at-rest-skills-probe.tssrc/main/codex/codex-skill-list.tssrc/main/codex/codex-structured-session-adapter.tssrc/main/codex/codex-structured-session-start.tssrc/main/codex/codex-structured-session-state.tssrc/main/codex/codex-structured-skill-report.test.tssrc/main/codex/codex-structured-skill-report.tssrc/main/codex/codex-structured-turn-start.tssrc/main/native-chat/agent-session-wire/at-rest-command-catalog.tssrc/main/native-chat/agent-session-wire/structured-agent-session-adapter-router.tssrc/main/native-chat/agent-session-wire/structured-agent-session-at-rest-commands.tssrc/main/native-chat/agent-session-wire/structured-agent-session-client-delivery.tssrc/main/native-chat/agent-session-wire/structured-agent-session-host.tssrc/main/runtime/structured-agent-runtime-registrations.tssrc/renderer/src/components/native-chat/NativeChatPromptEditor.tsxsrc/renderer/src/components/native-chat/NativeChatSkillPill.tsxsrc/renderer/src/components/native-chat/native-chat-composer-input.tssrc/renderer/src/components/native-chat/native-chat-composer-state.test.tssrc/renderer/src/components/native-chat/native-chat-composer-types.tssrc/renderer/src/components/native-chat/native-chat-prompt-document.tssrc/renderer/src/components/native-chat/native-chat-structured-composer-dispatch.tssrc/renderer/src/components/native-chat/structured-agent-session-command-refresh.tssrc/renderer/src/components/native-chat/structured-agent-session-send-slot.tssrc/renderer/src/components/native-chat/use-native-chat-composer-command-picker.tssrc/renderer/src/components/native-chat/use-native-chat-picker-state.tssrc/renderer/src/components/native-chat/use-native-chat-structured-composer-send.tssrc/renderer/src/components/native-chat/use-native-chat-structured-composer-transport.tssrc/renderer/src/components/native-chat/use-structured-agent-session-sends.tssrc/renderer/src/components/native-chat/use-structured-agent-session.tssrc/shared/agent-session-create-capabilities.tssrc/shared/agent-session-journal-schemas.tssrc/shared/agent-session-journal-types.tssrc/shared/agent-session-wire.tssrc/shared/native-chat-picker-items.tssrc/shared/native-chat-picker-triggers.tssrc/shared/native-chat-slash-commands.tssrc/shared/rpc-contract/structured-agent-session-message-params.tssrc/shared/structured-agent-session-send-mutation.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
23b8c5a2-31fa-41ee-a7ca-3301889abb0d
📒 Files selected for processing: 1
mobile/src/session/MobileNativeChatComposerMenu.tsx
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
|
Some skills selected in Codex chats did nothing because Orca’s folder scan disagreed with Codex about plugin names, disabled skills and files with the same name. The menus now use Codex’s loaded catalog, show the distinct file locations, and send the file selected on desktop. Existing commands, ordinary chat, workspace setup and older-host text sends retain their paths. Three review rounds and the final design ruling are complete. Fixes cover exact-file identity around punctuation, provider-authoritative empty/disabled catalogs, launch-input ownership and Refresh, a waiting read following its replacement within the original deadline, and refusing a whole request above sixteen distinct files while preserving the draft. Actual queued text or image changes clear selected-file bindings; untouched/no-op cards preserve them. Verification on Full macOS and Windows main-versus-branch QA on The authorized main integrations are complete at Five warm probes on each platform and separate cold observations were audited. Settled staging counts stayed stable in the five Windows warm contexts, while their answer snapshots briefly grew; cold population and macOS byte growth remain reported. Sampling can miss short-lived or changed identities, so no universal descendant-exit or storage-stability guarantee is claimed. An additional P2 resource cost is accepted temporarily by the lane owner and tracked in STA-11407: a pending, failed or unsupported live skill report can trigger an extra same-home discovery provider on cold/due subscriber or menu reads. No code fix, measured frequency or total-child bound is claimed. Remaining limits are explicit:
Unexpected observations are reported with their limits: workspace Interrupted can persist because another stopped session contributes to the summary after the queue session succeeds; no final live host summary was captured. Windows startup/profile and migration notices occurred during otherwise successful actions. In the current-head regression run, enabled Codex hooks repeatedly returned exit code 1 for SessionStart, UserPromptSubmit, PreToolUse, PostToolUse and Stop while the real edited-text and ordered-image replies still completed. Claude also reported a SessionStart hook error for an isolated command-alias file before its successful reply. The causes remain unproven; hooks were kept enabled. Windows Codex reported public skill paths outside its dedicated home; those paths were not read or modified by the QA driver. Final QA cleanup independently matched the recorded stop identities; all 303 sampled build/app/driver identities and the separately recorded CDP daemon were exited, and assigned ports were free. Sampling can miss short-lived descendants. Real configuration digests were compared: three matched and one differed with attribution unproven; this accepted shared-machine observation is report-only. The QA lead also printed non-secret configuration metadata during setup, contrary to the hash-only rule; no credential values were printed or copied. The QA Dispatch and ticket were released. For Brennan’s review: main-versus-branch screenshots are in the PR’s Visual Proof section. The three deliberate boundaries to inspect are the short-lived probe and retention floor, queued text and image edits clearing file bindings, and the temporary extra discovery work. |
ELI5
Some skills picked in a Codex chat did nothing: Orca's folder scan could disagree with Codex about plugin names, disabled skills and two files with the same name. The chat now asks Codex for its loaded skills, and desktop selections carry the chosen file when sent.
What Changed
The
$and/menus use Codex's reported names and enabled files, show distinct paths for duplicate names, and refresh when the running agent reports a change. Before the first message or while a chat rests, a short-lived check asks Codex using the chat's actual folder, saved launch arguments and environment. Commands remain available. A selected desktop skill carries its file through ordinary send, queue and steer; punctuation around its token preserves that selection. Older hosts receive ordinary text when they do not advertise support.Saved launch-input changes and explicit Refresh withdraw earlier resting answers immediately. A read already waiting follows the current answer within its original time limit. The shared resting-chat catalog also keeps Claude lists separate for differently pinned folders. Provider reports, including an empty list, suppress unrelated folder-scanner loading/error feedback.
A desktop message with more than sixteen distinct selected skill files is refused as a whole before sending. The editor keeps the draft and explains how to reduce the selection; no chosen file is silently dropped.
Why
The common pattern is to let the agent own discovery and bind a selection to its file. Extending Orca's scanner would keep duplicating changing loader rules and would not resolve duplicate names. Existing editor nodes, command reports, queue storage and host capability checks carry the selection; no new RPC or stream operation is added.
Differences and remaining work
Temporary — STA-11407: While a running Codex chat's own Codex hasn't answered its first skill list yet (or is too old to list skills), opening the list can start a separate short-lived Codex check for the same folder. Tracked in STA-11407. Subscribed chat updates can also trigger this work when the shared answer is missing or due, including after a failed first list; later reads follow the existing cache/retry rules. This accepts additional startup work, not a fixed total-child or resource bound.
Provider limitation — STA-11396: A skill picked and sent while Codex is still answering is delivered, but Codex applies skills only at the start of a turn, so it takes effect only when sent as a new message. Same as main and as Codex’s own composer.
Intended: desktop sends support at most sixteen distinct selected skill files, with an actionable refusal and the draft preserved above that limit. Older-host text sends keep their existing behavior. Hand-typed
$namestays plain text. Both running and resting lists exist because a chat has no agent process before Send. Orca's injected chat-visuals skill appears only once a chat runs.Intended mitigation: a resting check remains alive until 70 seconds from spawn while answering promptly. This reduces interrupted plugin startup work, tracked in fix(codex): prevent marketplace startup in rate-limit probes #21617. It is a floor, not proof that all synchronization completed: longer work may still be interrupted and leave staging data. Orca does not delete provider staging directories. Only two unanswered checks are admitted at once; already answered children may coexist while settling.
Temporary — STA-11316: phone selections remain plain
$name, so duplicate files cannot be selected exactly there. Results arriving after the phone's ten-second read appear on the next menu opening. A message the user edits or gets back reverts to plain$name; untouched/no-op queued messages retain their picked files. Full selection retention for these paths is follow-up work.Temporary — STA-11320: the existing shared-home mirror can synchronously recopy owned fallback directories when links are unavailable. Another preparation can reset provider-written cache entries under that copied target, including while a check still runs. This PR preserves the saved selected home; the mirror-owner follow-up must resolve resource ownership.
Temporary: Windows crash/force-quit can leave provider descendants, as with existing agent launches; normal check completion uses tree teardown while its root remains alive.
Linked Issue
Tracked in #30813, following #30827; original bug STA-11282.
Visual Proof
Full macOS and Windows evidence below compares immutable main
8b70b726with reviewed branch62a94d36. The final merged head is1bd17760; its short queued text/image edit and approved Settings agent Refresh → Claude catalog/reply regression passed. Current-head captures are below. Earlier full QA covers untouched flows. Each platform has five serial normal probe lifecycle/staging observations, with separate error/cold cases and finite sampling and cleanup checks; these do not establish a universal process or disk-growth bound. The additional discovery cost is accepted temporarily in STA-11407.Skill choices and disabled plugin: main → branch
Main collapses two review files into one choice and lists a disabled skill:
Branch shows both exact paths and the plugin’s qualified name:
With plugins disabled in saved launch arguments, main still lists the plugin:
Branch omits it before Send:
Real selected-skill replies and wrapped paths
The selected repository and personal review files return their different markers:
The qualified plugin runs and replies:
Long file locations wrap in a narrow rendered window:
Controlled Settings overlap and busy-send limitation
During one controlled two-second acquisition delay, saved plugin-disable arguments changed while the original read waited. That same caller returned the replacement catalog in 2.272 seconds. This is real-host controlled integration, not native phone proof:
For the busy-send limitation above, actual provider input carried the personal file and Codex accepted it, but the reply used the repository skill. Delivery is verified; mid-turn instruction execution is not claimed:
Selection limit, controlled queue, empty list and older-host integration
Seventeen distinct selected files are refused before sending, leaving all choices in the editor:
Queue capability is unavailable on both heads. Controlled actual admission followed by rendered Edit/Save/Resume produced real replies; changed text clears file bindings, while untouched and no-op cards keep them. The earlier Interrupted entry is a stopped turn:
An isolated source-config fixture disabled the actual provider-reported paths, followed by one shipped Refresh. The provider then reported zero skills and the menu displayed no matches:
Local integration combined the immutable main backend and preload with the final renderer. The old host advertised no selected-file capability, accepted an ordinary text message, and returned the real plugin reply. This does not prove paired transport or stripping a prebound draft:
Windows: main → branch choices and real file-specific replies
The immutable-main cold menu merges two review sources into one option and lists the disabled skill:
The final branch shows distinct paths, including a wrapped long location:
Picking the personal and repository files separately produces their different replies, including punctuation around the personal selection:
Seventeen distinct files are refused with the complete draft retained; removing the seventeenth allowed a real sixteen-file send. Hook failures shown in the captures occurred during successful replies and remain reported observations; hooks stayed enabled.
Windows lifecycle, compatibility phases and cleanup completed on
62a94d36. All 31 owned launch roots exited and assigned ports were clear. The short regression on the final merged head passed; its captures are below.Testing
118845090662, passed on1bd17760d5c62fbabfef92f70f2da994afd9ff58. Its first attempt failed the inherited WebKit drawer-opening test; the lane owner authorized exactly one failed-jobs rerun, which passed with no source change. The initial failure cause remains unproven; the private harness candidate was not applied.62a94d36, including five serial probe lifecycle/staging observations on each of macOS and Windows. The final1bd17760integration regression completed on Windows; earlier full QA applies only to untouched flows. Controlled queue admission and the approved actual Claude Refresh/catalog path are qualified below.Agent skill upstream boundary
Notes
Discovery executes on the host owning the chat; unsupported nested SSH/WSL locations retain existing behavior. One optional saved
skillsfield carries selected files for sent/queued messages, one optional reported-row path identifies the file, and an advertised runtime capability protects older hosts. Phone and older-host text limitations are explicit above.Checklist
X: @BrennanKB5
Windows timed newly added skill
Equivalent own skill fixtures in never-sent chats: immutable main still has an open menu with no matching row after 314.908 seconds; the branch lists its newly added skill after 310.964 seconds. The fixture names differ (
added863andadded852). Each observation stayed in its own original running copy and chat; the earlier inconclusive main attempt is excluded.Main:
Branch:
Windows: authoritative empty skills and older-backend compatibility
Full main-versus-branch QA here used immutable main
8b70b726e94d885475301f35c06dd8b0ef8cff46and branch62a94d36fcacc0e63d9e8322a16603560934e6a4. In separate own homes with the same nineteen disabled paths, main’s disk scan still showed five built-in rows; the branch honored the real provider’s nineteen disabled rows and zero enabled skills. Core slash commands remained available.Main:
Branch:
The local old-backend/new-renderer copy actually omitted the skill-send capability. Its selected plugin and seventeen pathless skill selections sent as text and received real replies. These screenshots demonstrate local integration; paired transport and stripping a previously bound draft were not exercised. Existing hook failures and migration notices remain visible.
Merging main let the pre-commit formatter reformat 11 files that main carried unformatted (tool timeline, tool output, pi RPC); formatting only, no behavior change. Those eleven files now exactly match the newer integrated main.
Final merged head: queued text and images, then Claude Refresh/catalog/reply
The short real Windows regression used exact
1bd17760d5c62fbabfef92f70f2da994afd9ff58, through qa-drive with Codex and fully isolated homes. Ordinary queue capability was absent; actual production admission used the rendered draft while Codex was busy, followed by rendered Stop, Edit, Save and Resume. This covers editing and dispatch after controlled admission.A skill chosen in the rendered picker:
Editing the queued text clears the selected-file binding. The actual provider request contained only the edited text:
The image editor kept red, removed green and added blue. Actual provider input contained the edited text and red/blue in that order; the real reply identified both in order:
There is no dedicated Settings model-list Refresh. The lane owner approved the shipped installed-agent detection Refresh, then the rendered Claude catalog and a real reply. Refresh returned; a new model-list child returned the models shown in the picker and exited naturally. The passive observer missed the raw discovery request frame because it used stdin end rather than write; actual launch, matching response, catalog and reply were captured. No retry, stalled-child retirement or enterprise-policy claim is made.
Hooks stayed enabled. Codex hook errors and Claude's isolated command-alias SessionStart error were visible during successful replies; their causes remain unproven. Final replies were expanded from collapsed turn details. Real configuration hashes were compared: three matched and one differed with attribution unproven; the latter is an accepted report-only shared-machine observation. The QA lead printed non-secret configuration metadata during setup contrary to the hash-only rule; no credential values were printed or copied.
Cleanup matched original and fresh recorded identities before each stop. All 303 sampled build/app/driver identities plus the separately recorded CDP daemon were exited and assigned ports were clear. Sampling can miss short-lived descendants; no universal cleanup bound is claimed. Provider temporary directories were preserved. The QA worker and gate ticket were released.