api/stop.py.dox.md
stop.py resolves the requested in-memory context and exposes the shared stop_context() operation used by the endpoint and slash command.Stop derives from ApiHandler, retaining the default authentication and CSRF protections.context; the endpoint never creates a missing context.AgentContext.kill_process(), clears pause state, preserves chat history and queued messages, and does not start another run.Agent process stopped. info step so the WebUI closes the interrupted process group.message, context, and a stopped boolean indicating whether the context was running when requested.stop_context() so cancellation, progress cleanup, and terminal logging remain identical to the Stop button.AgentContext task lifecycle.pytest tests/test_stop_agent.py and smoke-test stopping during model streaming and tool execution.No child DOX files.