What happened
On PR #1075, the code agent created a host_files entry in harness/code.yaml pointing to /tmp/jira-issue-context.json as a host_files.src path. This file is created by the Jira pre-script (pre-code-jira.sh), but the harness loader validates host_files entries at config load time — before pre-scripts execute. The harness loader rejected the entire coder agent before trigger evaluation even began.
@ralphbean discovered this during live dispatch testing on Aug 29 (comment): the Jira overlay declares the file as a remote-base host_files.src, so the harness loader rejects the whole coder agent. He made 5 manual commits between Aug 29 11:48–19:41 UTC to fix the context handoff: switching to ${RUNNER_TEMP} dynamic paths, marking the entry as optional: true, generalizing external tracker identity, and requiring prefetched context.
The review agent ran 13 cycles on this PR but never flagged the host_files timing issue. All 13 review cycles focused on code-level analysis (injection, variable naming, documentation, API contracts) while missing the fundamental infrastructure feasibility problem.
What could go better
The code agent had no guidance about the harness execution lifecycle. The code-implementation skill describes how to write harness config entries but does not explain the order in which the harness processes them:
- Config load + validation — harness YAML is parsed,
host_files entries are validated for existence
- Pre-scripts execute — runner-side scripts run, can create files
- Sandbox setup —
host_files are copied into the sandbox
- Agent execution — Claude runs inside the sandbox
Without this context, the code agent reasonably assumed the pre-script would create the file before it was needed. The fix was to mark pre-script-generated host_files entries as optional: true and use dynamic paths (${RUNNER_TEMP}/...) instead of hardcoded /tmp paths.
I am confident this is the root cause of the multi-day delay and 5 manual human commits. The code agent's structural approach was correct (pre-script creates file, host_files copies it to sandbox), but the timing assumption was wrong. This is a systematic gap — any future PR that adds a pre-script-generated host_files entry will hit the same loader rejection.
Proposed change
In skills/code-implementation/SKILL.md, add a section documenting harness execution order constraints. Specifically:
- Add a subsection (e.g., under the harness configuration guidance) explaining the execution lifecycle: config load → pre-script → sandbox setup → agent execution.
- Document that
host_files entries are validated at config load time. Files created by pre-scripts must be marked with optional: true to avoid loader rejection.
- Document that
host_files paths should use dynamic variables like ${RUNNER_TEMP} rather than hardcoded paths like /tmp.
- Include an example showing the correct pattern for pre-script-generated context files:
host_files:
- src: ${RUNNER_TEMP}/context.json
dst: /sandbox/workspace/.context.json
optional: true
Also consider adding a brief note in docs/code.md (the code agent operator documentation) referencing this constraint for harness config authors.
Validation criteria
On the next 3 PRs where the code agent adds or modifies host_files entries in a harness config that reference files created by pre-scripts: (1) the code agent marks those entries as optional: true in its initial commit, (2) the code agent uses dynamic path variables instead of hardcoded paths, and (3) no human intervention is required to fix harness loader rejection errors. A secondary signal: review agent findings should not include host_files timing issues on these PRs.
Generated by retro agent from #1075
What happened
On PR #1075, the code agent created a
host_filesentry inharness/code.yamlpointing to/tmp/jira-issue-context.jsonas ahost_files.srcpath. This file is created by the Jira pre-script (pre-code-jira.sh), but the harness loader validateshost_filesentries at config load time — before pre-scripts execute. The harness loader rejected the entire coder agent before trigger evaluation even began.@ralphbean discovered this during live dispatch testing on Aug 29 (comment): the Jira overlay declares the file as a remote-base
host_files.src, so the harness loader rejects the whole coder agent. He made 5 manual commits between Aug 29 11:48–19:41 UTC to fix the context handoff: switching to${RUNNER_TEMP}dynamic paths, marking the entry asoptional: true, generalizing external tracker identity, and requiring prefetched context.The review agent ran 13 cycles on this PR but never flagged the
host_filestiming issue. All 13 review cycles focused on code-level analysis (injection, variable naming, documentation, API contracts) while missing the fundamental infrastructure feasibility problem.What could go better
The code agent had no guidance about the harness execution lifecycle. The code-implementation skill describes how to write harness config entries but does not explain the order in which the harness processes them:
host_filesentries are validated for existencehost_filesare copied into the sandboxWithout this context, the code agent reasonably assumed the pre-script would create the file before it was needed. The fix was to mark pre-script-generated
host_filesentries asoptional: trueand use dynamic paths (${RUNNER_TEMP}/...) instead of hardcoded/tmppaths.I am confident this is the root cause of the multi-day delay and 5 manual human commits. The code agent's structural approach was correct (pre-script creates file, host_files copies it to sandbox), but the timing assumption was wrong. This is a systematic gap — any future PR that adds a pre-script-generated host_files entry will hit the same loader rejection.
Proposed change
In
skills/code-implementation/SKILL.md, add a section documenting harness execution order constraints. Specifically:host_filesentries are validated at config load time. Files created by pre-scripts must be marked withoptional: trueto avoid loader rejection.host_filespaths should use dynamic variables like${RUNNER_TEMP}rather than hardcoded paths like/tmp.Also consider adding a brief note in
docs/code.md(the code agent operator documentation) referencing this constraint for harness config authors.Validation criteria
On the next 3 PRs where the code agent adds or modifies
host_filesentries in a harness config that reference files created by pre-scripts: (1) the code agent marks those entries asoptional: truein its initial commit, (2) the code agent uses dynamic path variables instead of hardcoded paths, and (3) no human intervention is required to fix harness loader rejection errors. A secondary signal: review agent findings should not include host_files timing issues on these PRs.Generated by retro agent from #1075