MCPcopy Index your code
hub / github.com/shareAI-lab/learn-claude-code / should_run_background

Function should_run_background

s15_agent_teams/code.py:276–280  ·  view source on GitHub ↗

Model explicit request takes priority; fallback to heuristic.

(tool_name: str, tool_input: dict)

Source from the content-addressed store, hash-verified

274
275
276def should_run_background(tool_name: str, tool_input: dict) -> bool:
277 """Model explicit request takes priority; fallback to heuristic."""
278 if tool_input.get("run_in_background"):
279 return True
280 return is_slow_operation(tool_name, tool_input)
281
282
283def execute_tool(block) -> str:

Callers 1

agent_loopFunction · 0.70

Calls 2

is_slow_operationFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected