feat(hooks): config_change event — fires on /reload#230
Merged
emal-avala merged 1 commit intomainfrom Apr 23, 2026
Merged
Conversation
Adds a `ConfigChange` hook event that fires when on-disk extensions
are reloaded via /reload. External dashboards, CI watchers, and
alerting pipelines can now detect "a new skill file just landed"
or "MCP server count dropped" without polling the filesystem.
Context payload:
{
"skill_count": 24,
"agent_count": 3,
"hook_count": 2,
"mcp_count": 1
}
Wiring:
- HookEvent::ConfigChange variant with snake_case serde
- fire_config_change_hooks(skill, agent, hook, mcp) async method
on QueryEngine
- /reload handler fires after the extension rescan + prompt-cache
invalidation completes, using the existing block_on bridge
(matches /compact, /cd, /add-dir precedents)
- HOOK_EVENT_CATALOG, format_hook_event, parse_hook_event updated
- hooks/mod.rs module docs updated
Tests: 3 new
- Schema serde round-trip (config_change <-> "config_change")
- run_hooks dispatches for ConfigChange (async tokio)
- parse_hook_event accepts "config_change" / "config-change"
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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
Adds a
ConfigChangehook event that fires when on-disk extensions are reloaded via/reload. External dashboards, CI watchers, and alerting pipelines can now detect "a new skill file just landed" or "MCP server count dropped" without polling the filesystem.Context payload
{ "skill_count": 24, "agent_count": 3, "hook_count": 2, "mcp_count": 1 }Wiring
HookEvent::ConfigChangevariant withsnake_caseserdefire_config_change_hooks(skill, agent, hook, mcp)async method onQueryEngine/reloadhandler fires after the extension rescan + prompt-cache invalidation completes, using the existingblock_onbridge (matches/compact,/cd,/add-dirprecedents)HOOK_EVENT_CATALOG,format_hook_event,parse_hook_eventupdatedhooks/mod.rsmodule docs updatedTest plan
cargo clippy --workspace --tests --no-deps -- -D warnings— cleancargo test -p agent-code-lib --lib hooks::tests— 10 pass (9 prior + 1 new)cargo test -p agent-code-lib --lib config::schema::tests::hook_event_serde_roundtrip_config_change— passcargo test -p agent-code --bin agent commands::tests::parse_hook_event— 11 pass (10 prior + 1 new)3 new tests:
config_change↔"config_change")run_hooksdispatches forConfigChangeparse_hook_eventaccepts"config_change"/"config-change"