Skip to content

bug: make agent-bootstrap fails on PEP 668 Homebrew Python environments #1598

@Xunzhuo

Description

@Xunzhuo

Describe the bug

make agent-bootstrap currently calls python3 -m pip install -r tools/agent/requirements.txt directly. On Homebrew-managed Python environments that enforce PEP 668, that fails before any harness tooling is installed.

In the current repository state, the failing command is defined in tools/make/agent.mk line 36.

To Reproduce

  1. Use a Homebrew-managed Python environment with PEP 668 enabled.
  2. Run:
    make agent-bootstrap
  3. Observe the failure:
    error: externally-managed-environment
    
  4. As a comparison point, the repo-local .codex-agent-venv can run tools/agent/scripts/agent_gate.py successfully, so the problem is the bootstrap/install path rather than the harness code itself.

Expected behavior

make agent-bootstrap should install agent tooling through a repo-local virtualenv, pipx, or another repo-native path that works on standard Homebrew Python setups without asking contributors to break their system Python configuration.

Affected layer

global level

Additional context

Relevant files:

  • tools/make/agent.mk:33-42
  • tools/agent/requirements.txt

A small, contributor-friendly fix would be to make agent-bootstrap detect/create a venv and use that interpreter for the install step, while keeping the rest of the harness commands consistent.

Metadata

Metadata

Type

No type

Projects

Status

In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions