fix(skills): restrict lazy-skill allowlist exemption to the designated super agent - #97
Open
fepfitra wants to merge 2 commits into
Open
fix(skills): restrict lazy-skill allowlist exemption to the designated super agent#97fepfitra wants to merge 2 commits into
fepfitra wants to merge 2 commits into
Conversation
…d super agent Previously ANY is_super=1 agent bypassed the agent_skills allowlist check in use_skill, letting every super agent lazy-load any skill (e.g. exa-search) without an explicit assignment. Now the exemption applies only to the agent named by the super_agent_id setting (DB app_settings), so other super agents must have the skill in their agent_skills rows like everyone else. No hardcoding — the setting already exists and defaults to kremas.
Lazy skills load only from agent_skills for non-designated agents; only the super_agent_id agent gets blanket access.
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.
Problem
use_skillbypasses theagent_skillsallowlist for any agent withis_super=1:So every super agent can lazy-load any skill (exa-search, etc.) without an explicit
agent_skillsrow — the per-agent allowlist is meaningless for supers.Why it matters: skills like
exa-searchare paid (API-key billed). Any super agent calling them repeatedly could rack up unbounded cost and break the billing. Restricting skill access is the guardrail.Access model (after this PR)
super_agent_idsetting)is_super=1)agent_skillsrows (setting)api:sessions)agent_skillsrows (setting)Grant a skill via setting (no code change):
Fix
Narrow the exemption to the single designated super agent, read from the existing
super_agent_idsetting (DBapp_settings):No hardcoding — operators can change
super_agent_idor grant specific supers skills viaagent_skillsrows.Also documents the change in
defaults/super_agent_system_prompt.md(the template copied toagents/<id>/SYSTEM.md): super agents get full code execution but NOT automatic access to every skill; only the designated super agent loads any skill.Status: DONE ✅
Implemented, verified, deployed. Prevents excessive paid-skill usage from breaking billing.
Verification
super_agent_id) → exa-search loads ✓Skill 'exa-search' is not in your allowed skills list.✓