Skip to content

[codex] Recheck skill state before serving guidance#157

Merged
pmbstyle merged 1 commit into
mainfrom
codex/fix-skill-disable-bypass
Jun 3, 2026
Merged

[codex] Recheck skill state before serving guidance#157
pmbstyle merged 1 commit into
mainfrom
codex/fix-skill-disable-bypass

Conversation

@pmbstyle

@pmbstyle pmbstyle commented Jun 3, 2026

Copy link
Copy Markdown
Owner

What changed

  • refresh the current skill record inside _run_skill(...) before serving guidance
  • reject dynamic skill_<id> calls when the skill was disabled or removed after tool registration
  • add a regression test covering the stale-handler-after-disable path

Why

Recent skill management commits added enable/disable support, but dynamic skill handlers still captured the old skill record at registration time. That let a previously exposed skill_<id> tool keep returning guidance even after set_skill_enabled(..., enabled=False).

Impact

Disabled skills now stay disabled consistently for both generic use_skill and already-registered dynamic skill_<id> tools.

Validation

  • PYTHONPYCACHEPREFIX=/tmp/pycache python3 -m py_compile src/octopal/tools/skills/management.py tests/test_skill_management.py
  • git diff --check

Notes

Full pytest was not run here because the local system python3 environment does not have pytest installed.

@pmbstyle pmbstyle self-assigned this Jun 3, 2026
@pmbstyle pmbstyle marked this pull request as ready for review June 3, 2026 15:02
@pmbstyle pmbstyle merged commit 61aada9 into main Jun 3, 2026
4 checks passed
@pmbstyle pmbstyle deleted the codex/fix-skill-disable-bypass branch June 3, 2026 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant