mirror of
https://github.com/openai/codex.git
synced 2026-05-02 10:26:45 +00:00
Fix remote skill popup loading (#17702)
## Summary Fix the TUI `$` skill popup so personal skills appear reliably when Codex is connected to a remote app-server. ## What changed - load skills on TUI startup with an explicit forced refresh - refresh skills using the actual current cwd instead of an empty `cwds` list - resync an already-open `$` popup when skill mentions are updated - add a regression test for refreshing an open mention popup ## Root cause The TUI was sometimes sending `list_skills` with `cwds: []` after `SessionConfigured`. For the launchd app-server flow, the server resolved that empty cwd list to its own process cwd, which was `/`. The response therefore came back tagged with `cwd: "/"`, and the TUI later filtered skills by exact cwd match against the actual project cwd such as `/Users/starr/code/dream`. That dropped all personal skills from the mention list, so `$` only showed plugins/apps. ## Verification Built successfully with remote cache disabled: ```bash cd /Users/starr/code/codex-worktrees/starr-skill-popup-20260413130509 bazel --output_base=/tmp/codex-bazel-verify-starr-skill-popup build //codex-rs/cli:codex --noremote_accept_cached --noremote_upload_local_results --disk_cache= ``` Also verified interactively in a PTY against the live app-server at `ws://127.0.0.1:4511`: - launched the built TUI - typed `$` - confirmed personal skills appeared in the popup, including entries such as `Applied Devbox`, `CI Debug`, `Channel Summarization`, `Codex PR Review`, and `Daily Digest` ## Files changed - `codex-rs/tui/src/app.rs` - `codex-rs/tui/src/chatwidget.rs` - `codex-rs/tui/src/bottom_pane/chat_composer.rs` Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
@@ -3868,6 +3868,17 @@ impl App {
|
||||
app.enqueue_primary_thread_session(started.session, started.turns)
|
||||
.await?;
|
||||
}
|
||||
match app_server
|
||||
.skills_list(codex_app_server_protocol::SkillsListParams {
|
||||
cwds: vec![app.config.cwd.to_path_buf()],
|
||||
force_reload: true,
|
||||
per_cwd_extra_user_roots: None,
|
||||
})
|
||||
.await
|
||||
{
|
||||
Ok(response) => app.handle_skills_list_response(response),
|
||||
Err(err) => tracing::warn!("failed to load skills on startup: {err:#}"),
|
||||
}
|
||||
|
||||
// On startup, if Agent mode (workspace-write) or ReadOnly is active, warn about world-writable dirs on Windows.
|
||||
#[cfg(target_os = "windows")]
|
||||
|
||||
Reference in New Issue
Block a user