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

Function should_run_background

s16_team_protocols/code.py:280–284  ·  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

278
279
280def should_run_background(tool_name: str, tool_input: dict) -> bool:
281 """Model explicit request takes priority; fallback to heuristic."""
282 if tool_input.get("run_in_background"):
283 return True
284 return is_slow_operation(tool_name, tool_input)
285
286
287def start_background_task(block) -> str:

Callers 1

agent_loopFunction · 0.70

Calls 2

is_slow_operationFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected