fix(gateway): NameError on skill slash commands — wrong variable reference#1697
Merged
fix(gateway): NameError on skill slash commands — wrong variable reference#1697
Conversation
Line 1482 referenced 'session_key' which is not defined until line 1519, causing a NameError on every skill slash command invocation in the gateway (e.g. /deploy, /plan-with-skill). The try/except silently swallowed the error, making all user-defined skill slash commands silently fail. The correct variable is '_quick_key', defined at line 1292 (same variable used by the /plan handler on line 1379).
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 free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Skill slash commands in the gateway (e.g.
/deploy, any user-defined skill command) always silently fail with aNameError.Root cause: Line 1482 of
gateway/run.pypassessession_keyastask_idtobuild_skill_invocation_message(), butsession_keyis not defined until line 1519. Thetry/except Exceptionblock on line 1487 silently swallows the error, so the skill content is never injected and the message falls through to normal processing.Fix: Replace
session_keywith_quick_key, which is the session key variable defined at line 1292 — the same variable used by the/planhandler on line 1379.What changed
gateway/run.py: One-line fix —task_id=session_key→task_id=_quick_keyTest plan
/plan write a hello world) via Telegram/Discord