MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / _spawn_running

Function _spawn_running

tests/test_foreground_promotion.py:36–45  ·  view source on GitHub ↗

Spawn a teammate-like running agent and return its id.

(reg: RuntimeTaskRegistry, *, is_backgrounded: bool = True)

Source from the content-addressed store, hash-verified

34
35
36def _spawn_running(reg: RuntimeTaskRegistry, *, is_backgrounded: bool = True) -> str:
37 """Spawn a teammate-like running agent and return its id."""
38 agent_id = generate_task_id("local_agent")
39 register_async_agent(
40 agent_id=agent_id, description="x", prompt="x",
41 agent_type="general-purpose", registry=reg,
42 )
43 if not is_backgrounded:
44 register_agent_foreground(agent_id=agent_id, registry=reg)
45 return agent_id
46
47
48# ---------------------------------------------------------------------------

Calls 3

generate_task_idFunction · 0.90
register_async_agentFunction · 0.90

Tested by

no test coverage detected