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
Control listener thread dies on an unexpected handler exception #236
ControlServer._serve (simple_coding_agent/control_server.py:155-161) wraps each connection only in try/finally. Every _reply_* handler catches a fixed list of exception types (rejection classes, ControlStoreError, RuntimeError, OSError), so any other exception raised while handling a request (for example a KeyError or TypeError from a malformed checkpoint or a bug in a snapshot builder) propagates out of the accept loop and ends the agentctl-listener daemon thread.
The agent process keeps running, but from then on every agentctl command (including stop and handoff) fails with "Cannot connect to the agent process" until the container is restarted, and nothing in the event log says why.
Related: send_request (control_server.py:496-497) catches only OSError, so a reply over the 1 MiB _BUFFER_LIMIT surfaces as a ValueError traceback in agentctl instead of a clean exit 2.
Expected
One failing request never stops the listener: an unexpected exception is logged as an event and answered with {"ok": false, "error": ...} where the connection is still writable; the loop accepts the next connection.
agentctl reports an oversized or unparsable reply as a control error, not a traceback.
Context
Surfaced while deciding "Decide the agentctl telemetry command" (#225, map #222): the planned telemetry operation is polled every few seconds by a dashboard, which makes a latent listener crash far more likely to be hit.
Activity
lbacik commentedon Oct 14, 2026
Agent Attempt Result: complete
Branch: agent/issue-236
PR: #247
Evidence
UV_PROJECT_ENVIRONMENT=/home/agent/venv-py311 uv run --python 3.11 --extra dev ruff check && UV_PROJECT_ENVIRONMENT=/home/agent/venv-py311 uv run --python 3.11 --extra dev pytest && UV_PROJECT_ENVIRONMENT=/home/agent/venv-py313 uv run --python 3.13 --extra dev pytest→ exit code 0Details
Claude SDK completed the implementation workflow.