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
for cloud tasks, local skill invocations only sent the slash command text. User-local and repo-local skills were available in the local editor but not in the cloud sandbox
Changes
let's bundle uploadable local skills into zip artifacts with SHA-256 metadata and send them through the existing cloud artifact upload flow.
install skill_bundle artifacts in the agent server before prompt delivery, inject the bundled skill instructions for the invoked turn, and suppress the raw slash command from the model-facing prompt so local skills behave like actual skills rather than unsupported commands
refresh slash command metadata when a follow-up command is submitted, so newly created local skills can be selected and invoked without starting a brand-new task.
packages/core/src/sessions/sessionService.ts, line 2507-2511 (link)
Double-resolve of skill command prompt on terminal-status path
sendCloudPrompt resolves the prompt via resolveCloudPrompt before calling resumeCloudRun (line ~2253: return this.resumeCloudRun(session, normalizedPrompt)), and resumeCloudRun then calls resolveCloudPrompt again on the already-resolved prompt. If resolveLocalSkillCommandPrompt performs any side effects — reading local skill files, packaging archives, or making network calls — those operations execute twice. A concrete failure scenario: skill bundle artifacts could be uploaded twice, or file handles left open by the first pass could conflict with the second.
Either remove resolveCloudPrompt from resumeCloudRun (since sendCloudPrompt is currently its only caller and already hands it a normalized prompt), or pass the raw prompt to resumeCloudRun from sendCloudPrompt and keep resolution inside resumeCloudRun exclusively.
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
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
None yet
2 participants
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.
Problem
for cloud tasks, local skill invocations only sent the slash command text. User-local and repo-local skills were available in the local editor but not in the cloud sandbox
Changes
let's bundle uploadable local skills into zip artifacts with SHA-256 metadata and send them through the existing cloud artifact upload flow.
install
skill_bundleartifacts in the agent server before prompt delivery, inject the bundled skill instructions for the invoked turn, and suppress the raw slash command from the model-facing prompt so local skills behave like actual skills rather than unsupported commandsrefresh slash command metadata when a follow-up command is submitted, so newly created local skills can be selected and invoked without starting a brand-new task.
closes https://github.com/PostHog/code/issues/2260