-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Better handling skill depdenencies on ENV VAR. #9017
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
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: 08c5dfd013
ℹ️ 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".
| }); | ||
| } | ||
| }, | ||
| EventMsg::SkillDependencyRequest(_ev) => {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forward or resolve skill dependency requests
This match arm drops SkillDependencyRequest events entirely. When a client sets validate_dependencies: true (now part of the v2 UserInput::Skill payload), core awaits a response via request_skill_dependencies; if the app-server never forwards or auto-resolves the request, the turn will hang indefinitely waiting on the oneshot. Please mirror the exec/patch approval handling (e.g., send a request to the client or auto-cancel with ResolveSkillDependencies) so sessions don’t stall when dependencies are validated.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
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: 8b9694f7dd
ℹ️ 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".
| if !response.values.is_empty() { | ||
| let codex_home = sess.codex_home().await; | ||
| for (name, value) in &response.values { | ||
| if let Err(err) = save_env_var(&codex_home, name, value) { | ||
| warn!("failed to persist env var {name}: {err}"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gate dependency persistence on pending request
Because handle_skill_dependency_response persists values and updates the session env before checking whether the request_id is still pending, a late or unsolicited ResolveSkillDependencies will still write to the keyring/file and affect subsequent shell envs even after the turn cleared its pending requests. That can happen if a client responds after a cancel/timeout, or if a buggy client sends a response without a matching request. Consider verifying remove_pending_skill_dependencies returned Some before saving/updating, or otherwise ignoring responses that are no longer pending.
Useful? React with 👍 / 👎.
An experimental flow for env var skill dependencies. Skills can now declare required env vars in SKILL.md; if missing, the CLI prompts the user to get the value, and Core will persists provided values via keyring with a local file fallback.