Skip to content

runtime(shell): standardize container command shell to Bash #19

@pentaxis93

Description

@pentaxis93

Summary

Standardize runtime shell behavior to Bash for agent execution containers, and document this as an explicit runtime requirement.

Why

Today, skills and runtime commands may be interpreted by different shells between host and container (zsh, sh, bash). This creates avoidable friction and regressions when scripts rely on Bash features (arrays, [[ ... ]], ${var//.../...}, heredoc behavior, regex capture handling).

Recent example: branch-to-issue parsing in land relied on Bash regex capture behavior, but execution in non-Bash contexts failed with parsed zero issue numbers.

Proposal

  1. Set Bash as the shell for runtime containers (e.g. SHELL ["/bin/bash", "-c"] in Containerfile, or ensure container entrypoint invokes Bash for command execution).
  2. Document Bash as a runtime requirement in agentd docs and contributor guidance for skills.
  3. Add a lightweight runtime check and/or test coverage that fails clearly when Bash is unavailable.

Pros

  • Eliminates an entire class of host/container shell mismatch failures.
  • Makes skill authoring predictable: one guaranteed shell and feature set.
  • Low implementation cost; runtime containers are under project control.

Cons

  • Adds a hard dependency on Bash in container images.
  • Constrains portability for minimal BusyBox/ash-style environments unless adapted.

Context

Long-term direction is MCP-native structured tool calls (reducing shell reliance). But current skills still include shell scripts, so explicit shell standardization is a practical near-term stability move.

Recommendation

Adopt Bash as an explicit runtime requirement now, document it clearly as an implementation constraint (not a philosophical commitment), and revisit once MCP tool-call migration materially reduces shell surface area.

Acceptance Criteria

  • Runtime container definition guarantees Bash command execution.
  • Documentation states Bash as a required runtime dependency.
  • At least one automated check validates Bash availability/assumption in runtime images.
  • Existing skill execution paths are verified in the standardized shell environment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions