ReMe/reme/components
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
..
agent_wrapper fix(agent_wrapper): release Codex threads after each turn (#621) 2026-10-16 13:59:30 +08:00
as_classifier feat(classifier): add optional Jev component and service demo (#619) 2026-10-14 17:49:49 +08:00
as_embedding fix(embedding): exclude provider init from health timeout (#484) 2026-08-21 11:23:14 +08:00
as_llm feat(docker): add container deployment and multi-platform release workflow (#582) 2026-10-03 23:54:58 +08:00
client feat(service): support explicit wildcard network binds (#547) 2026-09-15 14:26:33 +08:00
embedding_store fix(embedding): retry 429 rate-limit errors instead of dropping the batch (#525) 2026-09-07 14:31:48 +08:00
file_catalog feat(core): support live component replacement (#505) 2026-08-28 16:04:02 +08:00
file_chunker fix(chunker): restore malformed JSON text fallback (#557) 2026-10-14 14:43:27 +08:00
file_graph feat(auto_resource): interpret image resources into daily notes (#500) 2026-09-07 12:00:38 +08:00
file_store perf(search): prepare search filters once per query (#591) 2026-10-14 18:14:21 +08:00
job feat(jobs): add a unified enabled switch for all job types (#580) 2026-09-30 18:30:36 +08:00
keyword_index perf(bm25): maintain live document length incrementally (#590) 2026-10-03 22:38:11 +08:00
outbound_proxy feat: add Auto Fin cookbook and managed outbound proxy support (#392) 2026-07-25 18:09:39 +08:00
service feat(jobs): add a unified enabled switch for all job types (#580) 2026-09-30 18:30:36 +08:00
tag_index feat: auto-tag plugin-generated reports (#534) 2026-09-11 11:52:52 +08:00
tokenizer Refactor logging levels and add dream schema definitions (#291) 2026-06-24 16:44:03 +08:00
__init__.py feat(classifier): add optional Jev component and service demo (#619) 2026-10-14 17:49:49 +08:00
application_context.py feat: add entry-point plugin system and extract Auto Fin (#459) 2026-08-19 17:23:23 +08:00
base_component.py feat(core): support live component replacement (#505) 2026-08-28 16:04:02 +08:00
component_registry.py feat: add entry-point plugin system and extract Auto Fin (#459) 2026-08-19 17:23:23 +08:00
prompt_handler.py fix(prompt): default omitted conditional flags to false (#424) 2026-08-06 16:22:59 +08:00
runtime_context.py feat: add workspace web APIs and star growth report (#416) 2026-08-05 18:03:37 +08:00