@@ -130,9 +130,7 @@ def _run_with_session_context(
130130 state .summary = summary
131131 state .done = True
132132 state .done_reason = "compacted"
133- task_queue = self ._build_direct_response (
134- f"Compaction complete. Summary: { summary } "
135- )
133+ task_queue = self ._build_direct_response (f"Compaction complete. Summary: { summary } " )
136134 return (task_queue , state ) if return_state else task_queue
137135
138136 context = self ._context_builder .build (
@@ -205,9 +203,7 @@ def _run_with_session_context(
205203 elif decision_type == "tool" :
206204 tool_id = str (decision .tool_id or "" ).strip ()
207205 if not tool_id or tool_id not in allowed_tool_ids :
208- last_error = (
209- f"Tool '{ tool_id or 'unknown' } ' not allowed for this step."
210- )
206+ last_error = f"Tool '{ tool_id or 'unknown' } ' not allowed for this step."
211207 tool_outputs .append (f"ERROR: { last_error } " )
212208 else :
213209 args = decision .args
@@ -220,9 +216,7 @@ def _run_with_session_context(
220216 tool_id ,
221217 args ,
222218 )
223- run_queue = TaskQueue (
224- plan_steps = plan .steps , action_steps = [action_step ]
225- )
219+ run_queue = TaskQueue (plan_steps = plan .steps , action_steps = [action_step ])
226220 run_queue = self ._run_action_plan (
227221 session_id ,
228222 run_queue ,
@@ -261,9 +255,7 @@ def _run_with_session_context(
261255 state .done_reason = "max_steps_reached"
262256 elif last_error :
263257 state .done_reason = (
264- "blocked"
265- if "permission denied" in last_error .lower ()
266- else "incomplete"
258+ "blocked" if "permission denied" in last_error .lower () else "incomplete"
267259 )
268260 else :
269261 state .done_reason = "completed"
0 commit comments