handle.stop() intermittently leaves _stop_requested false, agent never exits its loop
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Run the three-iteration repro in examples/agents/79_agent_message_bus.py, then inspect the /api/agent/{id}/stop and /api/workflow/{id} responses alongside server logs for a failing run. Done means the stop request reliably sets _stop_requested to true and the agent exits its loop instead of timing out on join(timeout=30).
Written by the indexing model from the issue text.
Description
handle.stop() returns without raising but sometimes _stop_requested is never set to true.
In examples/agents/79_agent_message_bus.py the DoWhile condition is not flipped (1 of 3 runs), the agent stays blocked on PULL_WORKFLOW_MESSAGES, and the caller dies on join(timeout=30) → TimeoutError.
Repro
cd examples/agents
for i in 1 2 3; do uv run python 79_agent_message_bus.py; echo "exit=$?"; done
On a failing run, take the id from Writer started: <id>:
curl -s "http://localhost:8080/api/workflow/<id>" | jq '.status, .variables._stop_requested'
# RUNNING, false <- stop() did not set the flag
curl -s -X POST "http://localhost:8080/api/agent/<id>/stop" -w '%{http_code}\n' # 200
curl -s "http://localhost:8080/api/workflow/<id>" | jq '.variables._stop_requested'
# true <- endpoint works when called by hand
Environment: conductor-oss server (agent runtime + WMQ enabled), python-sdk main.
Ruled out
- Endpoint itself — works by hand on the same stuck execution.
- Loop clobbering the flag — per-iteration
SET_VARIABLEwrites only_last_tool_resultsand_agent_state. stop()raising — it returned normally.- The WMQ unblock message — sent after the flag write, so it can't produce a
falseflag.
Unexplained: why the POST didn't apply despite a 2xx. Server logs for a failing run would settle it.
🤖 Generated with Claude Code
- Dominant language
- Python
- Stars
- 104
- Forks
- 43
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 4
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from conductor-oss/python-sdk
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
conductor-oss/python-sdk#507 ·
-
Difficulty 1/5 1-3 hours Newbie friendliness 90/100
conductor-oss/python-sdk#502 ·
-
bug dependencies
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
conductor-oss/python-sdk#486 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
conductor-oss/python-sdk#483 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
conductor-oss/python-sdk#478 ·
All issues in conductor-oss/python-sdk
Similar issues
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
simonw/sqlite-utils#872 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100