[Feature Request] Runtime Tool Availability Detection and Graceful Recovery from Missing Executables

Open
#339 3 comments 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

@martian56 is already working on this.

Since Nov 30, 2026.

  • #702 by @martian56 — open

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
18/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
docker, go, shell
Domain
backend, security

Research direction

The payload names no source files, so start from the shell execution path that runs Worker commands and reproduce the exit-127 case with command -v nikto inside the artex:local Docker image. Design choices remain open: where availability is cached, how the tool inventory is exposed to agents, and how missing tools are reported. Done means the acceptance criteria in the issue are met and failed invocations are not recorded as successful coverage. Confirm the design with maintainers before writing code.

Written by the indexing model from the issue text.

Description

feature

Problem

ARTEX agents can attempt to execute security tools that are not installed or accessible in the Worker runtime environment.

During a recent assessment, a Worker attempted to execute:

nikto -h https://iranopasmigirim.com/fa

The command failed with exit code 127.

Further verification inside the ARTEX Docker container confirmed:

sh: 1: nikto: not found

Nikto was not installed in the container. The agent selected the command, but its availability had not been verified before execution.

This raises a broader concern: agents should be aware of which external executables are actually available at runtime and recover appropriately when a required tool is missing.

Proposed Solution

Introduce runtime tool availability awareness and structured recovery for shell-based external tools.

  • Capability discovery: Provide agents with an accurate inventory of recognized security tools and their runtime availability.
  • Availability checks: Verify executable presence before invoking known external tools, using lightweight checks such as command -v.
  • Structured errors: Distinguish missing executables from tool execution failures, invalid arguments, and target-related errors.
  • Graceful recovery: Allow agents to select an available alternative or report the missing dependency without repeatedly invoking the unavailable command.
  • Evidence integrity: Ensure failed tool executions are recorded accurately and are not counted as successful security coverage.

These checks should be lightweight, cached where appropriate, and should not restrict agents from using legitimate custom commands through the shell.

Alternatives Considered

1. Install every security tool in the Docker image

This increases image size, dependency complexity, and maintenance overhead. It also cannot cover every tool an agent might need.

2. Rely entirely on the LLM to check tool availability

The model can run command -v, but this behavior is not guaranteed. Runtime-level capability awareness would make execution more predictable.

3. Handle exit code 127 only after execution

This is a useful fallback, but proactive capability discovery could avoid unnecessary failed commands and improve tool selection.

Additional Context

The issue was reproduced using the local ARTEX Docker runtime:

  • Runtime image: artex:local
  • Base OS: Debian 12
  • Agent: Worker
  • Failed command exit code: 127
  • Root cause: missing Nikto executable
  • No evidence of a PATH configuration or interpreter failure

This is not necessarily a request to bundle Nikto with ARTEX. The request concerns the broader reliability of autonomous tool selection and execution.

The existing tool installation and build-time verification mechanisms are valuable, but runtime capability awareness would complement them, particularly for tools invoked dynamically through shell commands.

Acceptance Criteria

  • Agents can discover which recognized external tools are available in their current execution environment.
  • Missing executables produce clear, structured diagnostics.
  • Agents can recover by selecting an available alternative when appropriate.
  • Repeated attempts to execute the same unavailable tool are avoided.
  • Failed tool invocations are not represented as successful assessments.
  • Existing shell flexibility and custom tool usage remain supported.
Dominant language
Go
Stars
18.7k
Forks
7k
Avg merge
10h 57m
Merged PRs (30d)
494

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from BaaRai/ARTEX

All issues in BaaRai/ARTEX

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.