Implement spawn_tracker module to enforce recursive agent spawning limits via R_MAX_SPAWN_DEPTH and R_MAX_TOTAL_SPAWNS environment variables, replacing the previous max_subagents parameter in tool_agent.c. Add tool_deepsearch.c implementing an iterative multi-query research algorithm with configurable system message, and register the new source files in Makefile build targets.
- Add agent_set_is_subagent and agent_set_tool_registry to agent API for subagent support
- Add timeout_seconds parameter to r_bash_execute to prevent hanging processes
- Refactor context_manager truncation logic with dynamic ratio-based truncation and total size calculation
- Add messages_to_json_string helper and r_config_get_max_tokens accessor
- Introduce tool_registry_get_specialized for type-filtered tool registries
- Add completion_phrases and passive_phrases detection to agent completion logic
- Suppress spinner in http_client when stderr is not a TTY
- Add comprehensive agent_benchmark.py with TestCase framework and logging