- Rating
- 2
- Confidence
- 2
- Informativeness
- 2
- Presentation
- 2
- Soundness
- 2
Read review
Paper summary
When leveraging past interaction trajectories for training, preserving the subsequent target while modifying its context may lead to a hidden mismatch, where the retained target still encodes the behavioral effects triggered by the absent context. The paper identifies this phenomenon as a "context ghost" entering the target. To isolate the contribution of target provenance, the paper proposes an experimental framework that decouples the context used for target generation from the context retained during fine-tuning by only controlling the presence of metadata conditions (open: "Recovery status for the record: open"; closed: "Recovery status for the record: closed"; neutral: no recovery status is inserted). The paper demonstrates with experiments that (1) "context ghost" exists; (2) naive prompt sanitization can amplify such biases; (3) regenerating targets under cleaned contexts can effectively mitigate "context ghosts"; (4) "context ghosts" vary across metadata types, models, and environments.
Critical strengths
- The paper identifies and formalizes a subtle and interesting failure mode specific to agent replay training: modifying training contexts may not eliminate their behavioral influence in the corresponding targets that were generated under the original contexts.
- The experimental design is logically structured, progressively establishing the existence of context ghosts, analyzing their causes, evaluating mitigation strategies, and characterizing their generality.
Critical weaknesses
-
The conceptual novelty of "context ghost" is not fully established. The phenomenon appears closely related to existing observations that supervision targets inherit information from their generation context, such as context distillation and biased imitation learning. The paper would benefit from a clearer distinction of what is fundamentally new in the agent replay setting.
-
The evidence for real-world prevalence of context ghosts remains limited. Although the paper studies multiple metadata types, models, and environments, the evaluated metadata are still manually designed perturbations rather than naturally collected signals from deployed agent systems. It remains unclear how frequently such context-target mismatches arise in practical trajectory curation pipelines.
-
The proposed mitigation may introduce additional data generation cost. Target regeneration requires rerunning agent trajectories under cleaned contexts, which can be expensive in large-scale replay pipelines. The paper demonstrates effectiveness, but the practical trade-off between mitigation benefits and additional rollout costs is not fully explored.
Questions for authors
-
How do the authors distinguish "context ghosts" from existing concepts such as context distillation, biased imitation learning, or target leakage? Specifically, what property of agent replay training makes this phenomenon fundamentally different from these existing mechanisms?
-
In practical agent training pipelines, how common are metadata fields that influence agent behavior but are later removed during curation? Do the authors have evidence from real-world trajectory datasets showing that this issue occurs beyond the controlled experimental settings?
3 comments
To Reviewer fmwk (2/2)
W3. Target regeneration may add data-generation cost in large replay pipelines, and the trade-off between its benefit and the extra rollouts is not explored.
A. Regeneration replaces each affected target with one new continuation. When the environment can be restored to the failure snapshot, the continuation simply starts there. On our FeedMerge corpora, it starts from a median context of 1.2k to 1.5k tokens and writes between half and two thirds of the output tokens of the original rollout. Without restorable snapshots, the cost equals one full rollout per affected record, exactly what the pipeline already paid to collect it.
Two properties keep this cost bounded. The admission test runs only once per field type, so regeneration applies strictly to records carrying a field that measurably moves behavior. Furthermore, cheaper remedies fall short. Paired dropping requires an extra rollout as well, yet its trained model still exits after one step in 31.1% of episodes, compared to just 1.8% for regeneration in the same paired run (Table 4 and Section 4.4).
Thank you for your detailed responses and experiments. My concern in W3 has been addressed, but my main concerns still remain. The added experiments demonstrate that framework instructions can influence agent behavior (which seems to be an expected consequence), but do not establish how frequently real-world curation pipelines actually remove such context while retaining the original continuations. More fundamentally, I think the conceptual novelty of context ghosts beyond existing context-conditioned supervision mechanisms is not fully established. Therefore, I still prefer to maintain my original rating.
To Reviewer fmwk (1/2)
We thank the reviewer for the time and effort devoted to our paper, and for recognizing the identified failure and the structure of our experiments. We respond to each point below.
A. We agree that context distillation is the closest neighbor. It compresses useful information into the weights on purpose, while a context ghost is an accidental distillation of administrative metadata that agent replay curation performs. The known strength of intentional distillation is exactly what makes this accidental variant a credible threat.
What makes agent replay different from the concepts the reviewer names lies in what the learner observes and what the hidden variable carries.
In context distillation and privileged demonstrators (Weihs et al., 2021; Ortega et al., 2021), the hidden information is useful for the task. In agent replay, the hidden field, such as a recovery status label, carries no task information.
Furthermore, in causal confusion (de Haan et al., 2019), the learner observes a nuisance variable and latches onto it. In a context ghost, the learner never observes the nuisance variable during training because the pipeline scrubs it from the prompt.
Finally, while target leakage moves label information into the input features, a context ghost does the exact opposite. Context information leaks into the target actions and stays there even after the input is sanitized.
Because the ghost is baked into the actions during the original rollout, scrubbing the field's wording from the target's rationale (Sanitize, Table 4) leaves the bias in place. This is why a context ghost requires counterfactual rollouts to measure and regeneration under the cleaned context to remove.
A. This is a central question for practice. The curation steps that create this mismatch are already documented standard practice. Agent SFT recipes routinely truncate histories to retain only recent states, and deployed agents frequently prune or summarize their past observations (Section 2). Each step alters the training input while keeping the continuation written under the original context. Our experiments use controlled metadata intentionally because starting two rollouts from otherwise identical snapshots is strictly required for causal measurement.
To show that these conditions occur in the wild, we have added new evidence from real datasets and operators to Appendices F and G.
First, framework-written text routinely sits outside the loss in released data. Across four public agent SFT releases (nebius/SWE-agent-trajectories, SWE-bench/SWE-smith-trajectories, zai-org/AgentInstruct, and SWE-Gym/OpenHands-SFT-Trajectories), such text appears in almost every trajectory within user or observation turns. These include explicit behavioral directives like SWE-smith's pre-submit review request and OpenHands' strict prohibition against asking for human help.
Crucially, this text directly shapes the next action. On hundreds of SWE-smith prefixes, at the exact point where SWE-agent issues its pre-submit review message, we kept the diff and removed the review instructions. This single deletion drastically shifts behavior. Without the instructions, both Qwen3-4B and Qwen3-30B-A3B immediately submit or end the task in the vast majority of cases. With the message intact as released, both models instead delete their reproduction scripts nearly every time, mirroring the released trajectories.
These results show that the ingredients of a context ghost are common in real data, and Appendix F identifies compaction as one curation step that removes such a field. For any specific pipeline, the paired probe in Algorithm 1 can directly measure this prevalence rate prior to training.