Repository navigation
Description
From the Oct 11–16 2026 Run retrospective, finding 14. Tracking issue: #721.
The evidence below is historical and attributed to the supplied report (repository snapshot 5504c97); it has not all been independently reproduced. Limited current-checkout checks were made at 53bb9c6. This is filed for maintainer triage, not automatic Pickup.
Requested outcome and validation
Add concise Factory guidance to prefer an available structured patch tool, such as apply_patch on Codex, for source edits. Preserve compatibility with Harnesses that expose different editing tools. The goal is to make intended context and changed regions explicit and avoid an unbounded string replacement changing unrelated matches.
Verify generated prompt examples and a representative session edit, and regenerate prompt artifacts through their source modules. Keep normal language-specific code generation and narrowly justified scripts possible; this finding does not establish that every scripted edit is wrong.
The report's optional python-is-python3 host installation is not necessary to establish safe editing behavior and should be evaluated separately if a supported command actually requires python. Prefer the explicitly supported executable over installing an alias solely to mask a failed first attempt.
Confidence is low–medium: the report identifies an over-broad replacement producing E0308 in #672, but broader impact and how much prompt guidance changes session behavior need verification.
Original finding, including evidence, proposed fixes, and confidence
14. Edits made by Python str.replace heredocs (Factory prompt and Host)
- Evidence:
- Every implement session edited through
python3 - <<'PY'. In Tickets keep their repository from the sub-issue graph to the Run #672 an over-broad.replacealso matchedopen_blockers.push(…)and caused E0308. - There's no
pythonon PATH, so the first try fails. - The sessions' own reviewers used apply_patch.
- Every implement session edited through
- Fix:
- Prompt line: "Edit files with apply_patch."
- Host:
python-is-python3.
- Confidence: low-medium.
Activity
JacobStephens2 commentedon Oct 17, 2026
Agent Brief
Category: enhancement
Summary: Give Factory sessions concise, Harness-compatible guidance to prefer structured patch tools for source edits.
Current behavior:
Shared Factory guidance covers foreground task lifecycle but does not state an editing preference. The retrospective attributes one over-broad scripted replacement to an unintended source edit; this is historical evidence, not a newly reproduced failure or proof that all scripted edits are unsafe.
Desired behavior:
Add a short preference for an available structured patch/edit tool that identifies the intended context and changed regions. Name
apply_patchwhere useful as an example for Codex, without assuming every Harness exposes that tool. Keep normal language-specific generation and narrowly justified scripts possible. Apply the guidance consistently to source-editing Factory sessions through the existing prompt/skill ownership model, avoiding irrelevant instructions on read-only sessions.Key interfaces:
Acceptance criteria:
Out of scope:
Installing python aliases, changing Harness permissions, replacing editing tools, blanket bans on scripts, or broader wait/navigation/standards work tracked separately.
Guide source-editing Factory sessions toward structured tools (#734)
Reconcile concurrent #734 implementation and retain prompt variant co…