Hot reload of agents and slash commands
Status Closed β not planned
Maintainer reply None cached
Workaround β Mentioned in thread β
Activity 12 comments Β· opened Aug 25, 2025 Β· closed Feb 9, 2026
Now in 1.0.90 you have added hot-reload of settings - thats EPIC - Hurray π
Hot reload of agents and custom slash commands would be HIGHLY apreciated as well - so if they are updated then the next exection of the slash comand will have the update included
12 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
π€ Generated with Claude Code
It is - but it needs attention then :-) - Close it as a dupe
https://github.com/anthropics/claude-code/issues/10348 - This is still a problem as of today.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
This is still a problem.
From what I understand this is a security risk, as it would allow a prompt injection attack to write a new command / overwrite an existing command and then execute it immediately. This is not official info, but I have seen official info saying the same thing about hooks, so I think it's logical.
IMO that horse has left the barn. They should at least give us a /reload slash command.
If someone has access to modify the slash commands on your system, and the risk is that you execute the command and that's the attack vector, then it's too late: they already have file modification access. Calling this a security risk is just silly, in my humble opinion.
There are so many other security holes in Claude Code (if someone is able to modify files) that auto-reload for active sessions is no reason to argue a security concern for things like prompts.
If they're really paranoid, then they can just make sure that none of the backtick content has changed (in which case /reload should work), but textual content is absolutely safe.
I have a user input hook, so if I run
:restart, it kills$PPID, and runs aclaude -r <uuid>, with the session number that came from the hook after changing to the working directory. (xdotooltypes it in since there is no pty in the hook context.) This is the nuclear option that works for me, but it seems like they should be able to support this:Adding to this discussion with a specific proposal for explicit, user-triggered reload (complementary to automatic hot-reload):
Proposed command:
/plugin reload [plugin-name]or/plugin reload --allThis provides:
The automatic hot-reload discussed here and manual reload command could coexist - auto for development convenience, manual for production control.
Submitted feedback ID:
98715579-0eb6-40a4-b00e-777f39d806fbThis issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
This issue was closed incorrectly despite recent human comments. This behavior of the bot is reported at https://github.com/anthropics/claude-code/issues/16497. Please upvote that issue, so maybe it gets noticed.
Hi, I filed a similar feature request in #23608 and the bot redirected me here as a duplicate β so I thought I'd share a workaround I've been using that fully bypasses the agent reload limitation within a live session.
The Workaround: Read Agent Files β Execute as Subagent Prompt
Instead of relying on the agent discovery mechanism (which only loads at session start), I have the main session use the Read tool to directly read the
.mdfile content from.claude/agents/, then pass that content as a prompt toTask()running as ageneral-purposesubagent.Since Read always fetches the latest file content from disk, any modifications to the agent file are picked up immediately β no session restart needed.
Known limitation: This approach cannot inherit YAML frontmatter settings (
allowed_tools,model,permission_mode). The subagent runs withgeneral-purposedefaults, so only the system prompt content is applied. For agents that primarily rely on prompt engineering rather than tool restrictions, this is sufficient.My Use Case: Autonomous Agent Self-Evolution Loop
I've been using this workaround to build an iterative self-improvement loop where Claude Code modifies its own agent definitions mid-session. Here's the full workflow:
Phase 1: Initialization (human-in-the-loop)
.claude/agents/worker.md) based on the task requirements..claude/agents/validator.md) whose job is to verify the Worker's output and report issues.Phase 2: First Run & Permission Audit (human-in-the-loop)
Phase 3: Switch to Autonomous Mode (semi-automated)
--dangerously-skip-permissionsand instruct the main session to run the following iteration loop:Phase 4: Iteration Loop (fully automated)
Phase 5: Convergence & Handoff (auto-detected β human review)
---
This workflow effectively turns the hot-reload limitation into a non-issue for my use case. Hope this helps others who need to iterate on agent definitions within a live session.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.