#109·ralph

Context variables (REPO, BRANCH) not reliably propagated to downstream steps

Author: robobobbyCreated Feb 23, 2026Updated Feb 23, 2026

Problem

When running workflows (feature-dev, bug-fix, security-audit), the first step (planner/triager/scanner) is instructed to output REPO: and BRANCH: key-value lines. These should be parsed by parseOutputKeyValues() and merged into the run context.

However, agents don't always output these keys in the expected format. When they're missing, all downstream steps receive [missing: repo] and [missing: branch] in their resolved input templates, causing them to operate blind.

Reproduction

  1. Start a feature-dev workflow with a task pointing to a specific repo
  2. Planner agent outputs STATUS: done and CHANGES: but omits REPO: and BRANCH:
  3. All downstream steps (setup, implement, verify, etc.) receive REPO: [missing: repo]

Suggested Fixes

  1. Validation gate: After the first step completes, verify that repo and branch exist in the run context. If missing, retry the step with a more forceful prompt, or fail with a clear error.
  2. Task-level context: Allow REPO and BRANCH to be specified in the task input itself (e.g. parsed from the task text), so they're available as fallback context from the start.
  3. Template warning: When resolveTemplate() encounters a missing key, log a warning rather than silently inserting [missing: key].

Environment

  • Antfarm v0.5.1
  • Observed across all 3 workflows