feat(ai_client): isolation of current_tier using threading.local() for parallel agent safety
This commit is contained in:
@@ -300,7 +300,7 @@ def run_worker_lifecycle(ticket: Ticket, context: WorkerContext, context_files:
|
||||
old_comms_cb(entry)
|
||||
|
||||
ai_client.comms_log_callback = worker_comms_callback
|
||||
ai_client.current_tier = "Tier 3"
|
||||
ai_client.set_current_tier("Tier 3")
|
||||
try:
|
||||
comms_baseline = len(ai_client.get_comms_log())
|
||||
response = ai_client.send(
|
||||
@@ -313,7 +313,7 @@ def run_worker_lifecycle(ticket: Ticket, context: WorkerContext, context_files:
|
||||
)
|
||||
finally:
|
||||
ai_client.comms_log_callback = old_comms_cb
|
||||
ai_client.current_tier = None
|
||||
ai_client.set_current_tier(None)
|
||||
if event_queue:
|
||||
# Push via "response" event type — _process_event_queue wraps this
|
||||
# as {"action": "handle_ai_response", "payload": ...} for the GUI.
|
||||
|
||||
Reference in New Issue
Block a user