You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: /reload slash command with auto-resume #43454
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
This is a follow-up to #6719 and the shelved PR #9871, with a working implementation on a fork.
Problem: Any change to config, agents, skills, MCP servers, or plugins requires a full restart of opencode. This interrupts running sessions and loses context.
Proposed solution: A /reload\ slash command that hot-reloads everything without restarting the TUI:
ConfigReload service — per-workspace state tracking with pending/executing/done lifecycle. Queues reload if sessions are active, executes when idle. Coalesces repeated requests during an active reload.
Auto-resume — after reload completes, the interrupted session is automatically resumed via \SessionPrompt.loop(). No synthetic continuation prompt; the loop reloads history from DB and continues with fresh config.
eload_config\ tool — agent-callable tool that triggers reload and stops the current turn via \stopAfterToolResult. The agent can reload config mid-session and the session continues automatically.
Server endpoints: \POST /config/reload, \GET /config/reload/status, \POST /config/bootstrap-complete\ for TUI reconnection after instance reload.
Bootstrap cycle tracking — TUI acknowledges reload completion with a matching cycle number, preventing stale acks from dismissing the reload overlay prematurely.
This issue might be a duplicate of existing issues. Please check:
[FEATURE]: slash command for reload #6719: "/reload slash command" — directly covers the same feature (you referenced this as a follow-up, but it may be better to continue the discussion there)
If this is intentionally a follow-up with a distinct implementation proposal (working fork, auto-resume, etc.), consider leaving a comment on #6719 linking here rather than opening a separate issue.
This issue documents the working implementation on a fork with key improvements over PR feat: add /reload slash command #9871 (auto-resume, error handling, test coverage for the resume path)
The scope here is narrower and implementation-focused — it tracks the specific design decisions (auto-resume via \SessionPrompt.loop(), \stopAfterToolResult\ mechanism, bootstrap-cycle tracking) that differ from the original proposal
The related issues (#6719, #8751, #39987) are all still open and relevant — this issue is the one with a concrete PR attached: #43458
Concrete pain from daily use: I iterate on agent files (agents/*.md, model routing like 9router/gemini-pro, combo membership) several times per session. Every change requires quitting the TUI and reopening to take effect, which kills session context and flow.
Related hazard worth noting: editing an agent file while a server/session is live can leave sessions in a broken state until restart (see #46245). A /reload that re-reads config + agents + skills/commands and resumes the session would fix both the friction and that class of staleness bugs.
This is implemented in v2: /reload rebuilds configuration and services without restarting the TUI, and running sessions continue with fresh services at the next step boundary. You can also run opencode reload from the CLI. Upgrade with npm i -g @opencode/cli@latest. If you still see this on v2, please open a new issue with the details.
Activity
github-actions commentedon Aug 19, 2026
This issue might be a duplicate of existing issues. Please check:
If this is intentionally a follow-up with a distinct implementation proposal (working fork, auto-resume, etc.), consider leaving a comment on #6719 linking here rather than opening a separate issue.
AndyS77 commentedon Aug 19, 2026
PR created: #43458
AndyS77 commentedon Aug 19, 2026
This is intentionally a follow-up with a working implementation, not a duplicate.
Why a new issue instead of continuing on #6719:
The related issues (#6719, #8751, #39987) are all still open and relevant — this issue is the one with a concrete PR attached: #43458
vuuminhphuoc commentedon Sep 5, 2026
+1 for /reload with auto-resume.
Concrete pain from daily use: I iterate on agent files (
agents/*.md, model routing like9router/gemini-pro, combo membership) several times per session. Every change requires quitting the TUI and reopening to take effect, which kills session context and flow.Related hazard worth noting: editing an agent file while a server/session is live can leave sessions in a broken state until restart (see #46245). A /reload that re-reads config + agents + skills/commands and resumes the session would fix both the friction and that class of staleness bugs.
feat(opencode): add /reload slash command with auto-resume
neriousy commentedon Oct 19, 2026
This is implemented in v2:
/reloadrebuilds configuration and services without restarting the TUI, and running sessions continue with fresh services at the next step boundary. You can also runopencode reloadfrom the CLI. Upgrade withnpm i -g @opencode/cli@latest. If you still see this on v2, please open a new issue with the details.