Skip to content

[BUG]: claude-code trials always fail in Tier 3 local mode (agent prompt is dropped) #245

Closed

Description

@psvaggelis

What happened?

In --env-mode local, every claude-code trial exits right away with:

Error: Input must be provided either through stdin or as a prompt argument when using --print

so no attempt is scored and the run ends as INCOMPLETE.

Harbor's claude-code agent passes the task prompt in an env var named HARBOR_CLAUDE_CODE_INSTRUCTION_<hex> (harbor 0.24.0, agents/installed/claude_code.py:1944). In local mode, SkillEvaluatorLocalEnvironment._filter_command_env removes every HARBOR_* command env var except HARBOR_DECLARED_PORTS (src/skillevaluator/tier3/harbor/local_environment.py:1673), so the prompt never reaches claude --print.

Expected: the agent gets its prompt and the trial is scored. Harbor path variables like HARBOR_WORKSPACE_DIR should still be filtered.

codex and opencode are not affected as far as I can tell, since Harbor puts their prompt directly on the command line. I only ran claude-code.

Same filter as #132, but a different variable, and it still happens on current main.

I have a small fix with regression tests and can open a PR.

Reproduction steps

  1. Create a minimal skill:

repro-skill/SKILL.md

---
name: repro-skill
description: Answers argparse questions. Use when asked about argparse.
---
# repro-skill
Answer the question in two lines.

repro-skill/evals/evals.json

{"skill_name": "repro-skill", "evals": [{"id": "q1",
  "prompt": "What does nargs='?' mean in argparse?",
  "expected_output": "Zero or one value; const when the flag has no value."}]}
  1. Run (with ANTHROPIC_API_KEY set and SKILL_EVAL_LLM_PROVIDER=anthropic):
skillevaluator tier3 evaluate ./repro-skill \
  --agents claude-code --env-mode local --n-attempts 1
  1. Result: Tier 3 Evaluation: INCOMPLETE, Scored attempts: 0/2. Both trial logs (claude-code.txt) contain the error above.

If the filter also keeps HARBOR_INSTRUCTION and HARBOR_<AGENT>_INSTRUCTION_<hex>, the same run completes with both attempts scored.

SkillEvaluator version or commit

v0.6.0 and main @ d9fa4b4

Environment

Ubuntu Linux (kernel 6.8), Python 3.12.13, installed from source with pip install -e ".[all]", harbor 0.24.0, Claude Code 2.1.312, bubblewrap sandbox. Judge: anthropic provider with an API key. Docker mode not tested.

Before submitting

Activity

  1. psvaggelis commented on Oct 29, 2026

    @psvaggelis
    Author

    Confirmed fixed on my side. Same machine, same skill, claude-code in --env-mode local (Harbor 0.24.0, Claude Code 2.1.312):

    Thanks for the quick fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions