# Rethinking Self-Repair in Code-as-Policy Agents: What Drives Retry Success?

Code-as-Policy 에이전트의 자기 수정 재고: 재시도 성공을 이끄는 요인은 무엇인가?

Siddharth Aphale, Ayushman Singh · arXiv · 2026년 11월 4일

- **연구 문제** 재시도 기반 로봇 코드 에이전트에서 실패 기반 피드백이 회복률을 실제로 높이는지, 아니면 추가 샘플링이나 고정 과제 지침의 효과인지 불분명합니다.
- **연구 방법** 실패 라벨에 맞는 고정 템플릿을 재시도 프롬프트에 넣고, 재샘플링·다른 라벨 피드백·고정 과제 템플릿과 같은 재시도 상한에서 비교합니다.
- **주요 결과** 주요 평가에서 Compiled는 재샘플링보다 높은 회복률을 보였지만, 라벨 일치나 고정 지침과의 차이는 탐지되지 않았습니다. 너트 삽입 과제에서는 지침 충돌로 회복률이 낮아졌습니다.

## 재시도 성공의 원인을 묻는 문제

코드를 정책으로 쓰는 로봇 에이전트는 실행 실패 후 실행 피드백을 받아 프로그램을 다시 생성하곤 합니다. 그러나 재시도가 성공하는 이유에는 추가 샘플링, 과제 지침, 현재 실패에 대한 피드백, 이전 프로그램 편집이 함께 섞여 있어 실패 맞춤 피드백의 기여가 불분명합니다. 이 논문은 모의 로봇 조작 환경에서 이 질문을 검증합니다. 이 연구는 장면을 원래 상태로 되돌린 뒤 다시 생성하는 설정(reset-and-retry)에 한정되며, 실패 후 물리 상태에서 복구하는 경우는 테스트하지 않습니다.

## 템플릿 피드백과 비교 조건의 구성

주요 방법인 Compiled는 규칙 기반 라벨러가 실패를 14개 라벨 중 하나로 분류한 뒤, 라벨과 API 변형에 맞는 고정 템플릿을 조회하여 재시도 프롬프트에 추가하는 방식입니다. 이 조회는 추가 모델 호출을 필요로 하지 않습니다. 이 방법은 누적된 피드백을 최신순으로 정렬하고 중복 지시를 제거하지만, 생성 프롬프트에서는 이전 프로그램을 제외합니다. 비교군으로는 피드백 없이 반복하는 Resample, 같은 과제 내 다른 라벨의 피드백을 쓰는 Different-Label Feedback, 과제별 고정 템플릿을 재사용하는 Fixed Task Template 등이 있습니다.

## 주요 평가의 설정과 회복률 비교

주요 평가는 Qwen2.5-Coder-7B-Instruct를 고정한 상태에서 primitive API로 큐브 들어 올리기와 쌓기 과제를 수행합니다. 평가에는 252개의 초기 실패가 사용되며, 각 재시도는 최대 다섯 번까지 허용됩니다. Compiled는 다섯 번 이내 재시도에서 85.3%를 회복하고, 같은 재시도 상한의 Resample은 68.3%를 회복합니다. 차이는 +17.1 pp이며 95% CI는 \[+9.9,+24.2\]입니다. Different-Label Feedback과 Fixed Task Template은 각각 86.1%로 Compiled와 비슷한 점 추정치를 보였고, 라벨 일치의 이점은 탐지되지 않았습니다.

다만 신뢰구간이 차이를 배제하지 않으므로 동등성이 입증된 것은 아닙니다.

![Figure 1: Template-based feedback improves recovery over resampling. (a)Reset-and-retry loop and feedback methods.(b)Recovery on 252 initial failures, with sim…](https://refivu.com/papers/b059d5fc-9fbd-4d44-846a-33133db966db/figures/figure-9db187c558e401d0d74dac1c791a7b6a.png?thumb=512)

**Figure 1** :Template-based feedback improves recovery over resampling. (a)Reset-and-retry loop and feedback methods.(b)Recovery on 252 initial failures, with similar outcomes for Compiled, Different-Label Feedback, and Fixed Task Template.

[원문](https://arxiv.org/abs/2611.06863v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Siddharth Aphale, Ayushman Singh · Rethinking Self-Repair in Code-as-Policy Agents: What Drives Retry Success? · 원문 그림 인용 · 원본 PDF 2쪽에서 그림 영역을 추출했습니다.

![Figure 2: Guidance improves recovery under fixed token budgets. (a)An initial failure followed by a successful retry after reset.(b)Recovery under total-token…](https://refivu.com/papers/b059d5fc-9fbd-4d44-846a-33133db966db/figures/figure-2640983e0d7e30e3269f34d1096e4f90.png?thumb=512)

**Figure 2** :Guidance improves recovery under fixed token budgets. (a)An initial failure followed by a successful retry after reset.(b)Recovery under total-token budgets.(c)Paired recovery@5 comparisons show an advantage over resampling, with no detected advantage over different-label or fixed-template guidance.

[원문](https://arxiv.org/abs/2611.06863v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Siddharth Aphale, Ayushman Singh · Rethinking Self-Repair in Code-as-Policy Agents: What Drives Retry Success? · 원문 그림 인용 · 원본 PDF 5쪽에서 그림 영역을 추출했습니다.

![Table 2: Primary paired contrastson 252 initial failures. Each entry is Compiled minus the comparator in recovery@5, with a 95% paired-bootstrap CI](https://refivu.com/papers/b059d5fc-9fbd-4d44-846a-33133db966db/figures/figure-90a5cbc2727b1036cc19b4ba8f825a01.png?thumb=512)

**Table 2** :Primary paired contrastson 252 initial failures. Each entry is Compiled minus the comparator in recovery@5, with a 95% paired-bootstrap CI.

[원문](https://arxiv.org/abs/2611.06863v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Siddharth Aphale, Ayushman Singh · Rethinking Self-Repair in Code-as-Policy Agents: What Drives Retry Success? · 원문 그림 인용 · 원본 PDF 5쪽에서 그림 영역을 추출했습니다.

## 첫 시도부터의 고정 지침과 한계

700개의 새 장면에서 Static-from-Start는 첫 시도부터 완전한 Fixed Task Template 재시도 프롬프트를 사용하여 초기 성공률을 19.3%에서 36.9%로 높였습니다. 여섯 번째 실행까지의 전체 성공률은 92.4%로, Compiled의 89.6%와 Fixed Task Template의 90.1%와 비슷합니다. 다만 이 비교는 지침과 생성 지시를 함께 바꾸므로 각각의 기여를 분리하지 못합니다. 이 결과는 재시도 피드백이 현재 실행 흔적을 사용했다고 증명하지 않습니다.

![Figure 3: A fixed guided prompt improves initial success. (a)Initial and overall success on 700 fresh scenes.(b)Total model tokens per solved episode. Static-f…](https://refivu.com/papers/b059d5fc-9fbd-4d44-846a-33133db966db/figures/figure-4a4028fea4018a37763adcf32c012393.png?thumb=512)

**Figure 3** :A fixed guided prompt improves initial success. (a)Initial and overall success on 700 fresh scenes.(b)Total model tokens per solved episode. Static-from-Start changes both the initial instruction and guidance.

[원문](https://arxiv.org/abs/2611.06863v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Siddharth Aphale, Ayushman Singh · Rethinking Self-Repair in Code-as-Policy Agents: What Drives Retry Success? · 원문 그림 인용 · 원본 PDF 6쪽에서 그림 영역을 추출했습니다.

## 일반화 평가와 과제 의존성

Qwen2.5-Coder-3B/7B의 일곱 개 조건과 네 과제, 354개의 초기 실패를 합친 평가에서 Compiled는 Resample보다 recovery@5가 +18.1 pp 높았습니다. 그러나 너트 삽입 과제에서는 요구되는 rim grasp가 템플릿의 중앙 잡기 지시와 충돌하여 Compiled의 recovery@5가 82.5%, Resample이 97.5%로 나타났습니다. 이 차이는 −15.0 pp이며 CI는 \[−27.5,−2.5\]입니다. 따라서 한 과제 계열에서 도움이 되는 지침이 다른 과제에서는 해로울 수 있습니다.

![Figure 4: Guidance benefits vary across tasks and models.Compiled–Resample recovery differ- ences across evaluated settings. The diamond summarizes the seven e…](https://refivu.com/papers/b059d5fc-9fbd-4d44-846a-33133db966db/figures/figure-c3d723c449ab4bd98595f599a39682d0.png?thumb=512)

**Figure 4** :Guidance benefits vary across tasks and models.Compiled–Resample recovery differ- ences across evaluated settings. The diamond summarizes the seven eligible generalization settings.

[원문](https://arxiv.org/abs/2611.06863v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Siddharth Aphale, Ayushman Singh · Rethinking Self-Repair in Code-as-Policy Agents: What Drives Retry Success? · 원문 그림 인용 · 원본 PDF 7쪽에서 그림 영역을 추출했습니다.

## 해석의 범위와 한계

연구 결과는 특권 상태 정보와 거친 피드백을 사용하는 시뮬레이션 조작에 한정됩니다. 일부 비교는 지시와 정보 변경을 함께 포함하므로 각 요인의 기여를 완전히 분리하지 못합니다. 저자들은 재시도 성공이 대체로 재사용 가능한 과제 지침에서 나온다고 해석하지만, 이는 이 설정에서 관찰된 결과에 근거한 해석입니다. 시각 피드백과 물리적 회복까지 확장한 평가는 아직 다루지 않았습니다.

## 논문 정보

- **저자**: Siddharth Aphale, Ayushman Singh
- **학회·저널**: arXiv · 프리프린트
- **최초 공개일**: 2026년 11월 4일
- **등록일**: 2026년 11월 6일
- **수정일**: 2026년 11월 4일
- **버전**: v1
- **arXiv**: 2611.06863
- **분류**: cs.RO
- **원문 이용 조건**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **제공 범위**: 논문 정보, 해설, 허용된 원문 그림

[논문 원문 ↗](https://arxiv.org/abs/2611.06863v1) · [원문 PDF ↗](https://arxiv.org/pdf/2611.06863v1)

AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.

## 초록

Code-as-policy agents often use execution feedback to retry failed programs. Additional sampling and task guidance can also improve success, leaving the contribution of failure-specific feedback unclear. We study this question in simulated robot manipulation. A fixed lookup selects feedback templates using failure labels and the API variant. A frozen code model generates a fresh program after each scene reset. On the same 252 initial failures, Qwen2.5-Coder-7B recovers 85.3% within five retries, compared with 68.3% for resampling with the same retry cap. The advantage persists under fixed total-token budgets. Feedback from other episodes and fixed task guidance yield similar recovery point estimates, with no detected benefit from matching the coarse failure label. In a separate study, a fixed guided prompt used from the first attempt achieves an observed overall success rate similar to that of template-based feedback. Template-based feedback also lowers recovery on a nut-insertion task requiring a rim grasp, consistent with an incompatible center-grasp instruction. Evaluations of robot self-repair should include resampling, mismatched feedback, and concise, task-compatible static guidance as baselines.

## 원문 인용

Siddharth Aphale, Ayushman Singh (2026). Rethinking Self-Repair in Code-as-Policy Agents: What Drives Retry Success?. arXiv:2611.06863v1. https://arxiv.org/abs/2611.06863v1

**BibTeX**

```
@misc{aphale2026rethinking,
  title = {{Rethinking Self-Repair in Code-as-Policy Agents: What Drives Retry Success?}},
  author = {Siddharth Aphale and Ayushman Singh},
  year = {2026},
  eprint = {2611.06863},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.06863v1}
}
```

## 다른 논문 해설

- [Bernoulli On-Policy Distillation: Don't Ignore High-Confidence Student Tokens](https://refivu.com/papers/8b8b436f-cb22-42ff-ae0e-fa85467e47b5-bernoulli-on-policy-distillation-don-t-ignore-high.md)
- [Proposing Better Rollouts for On-Policy Distillation](https://refivu.com/papers/fabcc93b-b034-4e58-a2ad-98455e527f63-proposing-better-rollouts-for-on-policy-distillation.md)
- [ProAS: A Progress-Aware Advantage Shaping Framework for Multi-Turn Agentic Reinforcement Learning](https://refivu.com/papers/c3b5cf13-3621-4e98-b6b3-4078125e9cce-proas-a-progress-aware-advantage-shaping-framework-for.md)
- [Continual Reinforcement Learning by Planning with Online World Models](https://refivu.com/papers/429db652-99f5-405e-9e74-a910f88e4b76-continual-reinforcement-learning-by-planning-with-online.md)
- [From Generative to Episodic: Sample-Efficient Replicable Reinforcement Learning](https://refivu.com/papers/b78b13e6-6d29-4338-85d7-9e0fdb6ad862-from-generative-to-episodic-sample-efficient-replicable.md)
- [Value-Based Deep RL Scales Predictably](https://refivu.com/papers/4f437e58-75bd-41b3-bb4e-01521b21eb44-value-based-deep-rl-scales-predictably.md)
- [Where Is VLA Inference Time Spent? Bottlenecks and Optimization Interactions Across GPUs](https://refivu.com/papers/854119e9-3cbb-49ef-a431-78511985c237-where-is-vla-inference-time-spent-bottlenecks-and.md)
- [ALTO: African and Levantine Tech-Facilitated Gender-Based Violence Corpus](https://refivu.com/papers/286497c9-5b20-4fa4-a316-0a1a03c9e22c-alto-african-and-levantine-tech-facilitated-gender-based.md)
- [Do unlearning algorithms learn the right features?](https://refivu.com/papers/8c15f6e1-5f54-4e95-93e6-7f609fd89e59-do-unlearning-algorithms-learn-the-right-features.md)
- [FrontierPhysics: Evaluating Agents for End-to-End Physics Research](https://refivu.com/papers/1ce4f126-66ec-4969-9dbe-f7e90f1e4e61-frontierphysics-evaluating-agents-for-end-to-end-physics.md)
- [The AGINAO Self-Programming Engine](https://refivu.com/papers/ff2da0aa-597e-4b23-9ddd-9c66b0881058-the-aginao-self-programming-engine.md)
- [Collaborative OLAP with Tag Clouds: Web 2.0 OLAP Formalism and Experimental Evaluation](https://refivu.com/papers/2c303059-2f84-4e39-b43e-b9e23b43102f-collaborative-olap-with-tag-clouds-web-2-0.md)

---

AI 해설에는 오류가 있을 수 있습니다. [Refivu](https://refivu.com/papers/b059d5fc-9fbd-4d44-846a-33133db966db-rethinking-self-repair-in-code-as-policy-agents)
