ReMe/reme
Chen Wang a6509ff479
fix(agent_wrapper): release Codex threads after each turn (#621)
* fix(agent_wrapper): release Codex threads after each turn

Loaded Codex threads and their per-thread MCP server subprocesses were
never unloaded from the app-server, growing file descriptors and child
processes monotonically until the wrapper was closed (fd exhaustion,
os error 24). Reply, streaming reply, and compact_session now
unsubscribe the thread in a turn-scoped finally block by default; the
new release_threads=False option restores the previous behavior.
Unsubscribe failures are logged and never break the turn, and threads
remain resumable after being unloaded.

Closes agentscope-ai/ReMe#609

* fix(agent_wrapper): keep tool-context guard on failed release and cover stream startup

A failed thread/unsubscribe left the thread loaded in the app-server
but dropped its tool-context entry, so a later resume with changed
tool_context_id or injected_job_kwargs would silently bypass the
constraint check. Keep the guard entry unless the unsubscribe request
succeeds.

reply_stream now releases the thread from an outer try/finally scoped
right after _open_thread, so threads are also unloaded when turn/start
raises or the caller is cancelled while awaiting it.
2026-10-16 13:59:30 +08:00
..
components fix(agent_wrapper): release Codex threads after each turn (#621) 2026-10-16 13:59:30 +08:00
config fix(search): accept CLI queries that look like numbers (#612) 2026-10-16 10:36:05 +08:00
enumeration feat(classifier): add optional Jev component and service demo (#619) 2026-10-14 17:49:49 +08:00
schema feat(jobs): add a unified enabled switch for all job types (#580) 2026-09-30 18:30:36 +08:00
steps fix(auto-dream): checkpoint scanned source versions (#618) 2026-10-16 12:13:48 +08:00
utils feat(token counter): add Qwen token counting utility with fallback (#616) 2026-10-16 11:58:35 +08:00
__init__.py chore: bump ReMe and OpenClaw versions (#549) 2026-09-15 18:29:25 +08:00
application.py feat(docker): add container deployment and multi-platform release workflow (#582) 2026-10-03 23:54:58 +08:00
constants.py feat(service): support explicit wildcard network binds (#547) 2026-09-15 14:26:33 +08:00
entry_point.py feat: simplify plugin setup and add management CLI (#485) 2026-08-23 17:58:20 +08:00
plugin.py feat: simplify plugin setup and add management CLI (#485) 2026-08-23 17:58:20 +08:00
plugin_cli.py feat: simplify plugin setup and add management CLI (#485) 2026-08-23 17:58:20 +08:00
plugin_manifest.py feat: simplify plugin setup and add management CLI (#485) 2026-08-23 17:58:20 +08:00
reme.py feat: simplify plugin setup and add management CLI (#485) 2026-08-23 17:58:20 +08:00