mirror of
https://github.com/usestrix/strix.git
synced 2026-11-04 07:27:16 +00:00
make_model_settings sets parallel_tool_calls=False (one tool call per turn), so
an agent mapping a codebase pays a full model round-trip per file read / command.
These two function tools let it fan out in a SINGLE call: the reads/execs run
concurrently inside the sandbox (asyncio.gather, semaphore-bounded to 8) and the
combined results come back in one tool response — a real wall-clock win on the
recon-heavy phase of a scan.
- batch_view_files(paths): concurrent read of up to 50 files; per-file result
{path, content|error, truncated}, order preserved (results[i] ↔ paths[i]).
- batch_terminal_execute(commands): concurrent run of up to 50 INDEPENDENT shell
commands; per-command {command, exit_code, stdout, stderr}.
Both are session-injected at the core (_view_files_impl / _exec_impl) with a thin
@function_tool shell, so the concurrency + isolation logic is directly testable
without the SDK tool-call layer. Per-item error isolation: one failing read/exec
returns its own error entry, never aborts the batch. Concurrency is bounded so a
large batch can't swamp the sandbox; batch size capped at 50.
Registered in _BASE_TOOLS so root + child agents get them. Session accessed via
the same ctx.context["sandbox_session"] convention the existing tools use. Tools
self-describe; no prompt change — models reach for them unprompted.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| tools | ||
| __init__.py | ||
| test_agent_factory_shell.py | ||
| test_agent_tool_registration.py | ||
| test_backend_retries.py | ||
| test_cli_target_list.py | ||
| test_config_loader.py | ||
| test_cost_tracking.py | ||
| test_docker_client_delete.py | ||
| test_execution.py | ||
| test_hooks.py | ||
| test_inputs.py | ||
| test_local_dir_staging.py | ||
| test_local_sources.py | ||
| test_models.py | ||
| test_notes.py | ||
| test_optional_deps.py | ||
| test_provider_hints.py | ||
| test_proxy_renderer.py | ||
| test_report_writer.py | ||
| test_reporting_fields.py | ||
| test_runner_rate_limit.py | ||
| test_runner_root_prompt.py | ||
| test_sarif.py | ||
| test_sarif_stride.py | ||
| test_session_entries.py | ||
| test_skill_dir_extension.py | ||
| test_state_repo_context.py | ||