---
title: "为长时运行智能体设计有效约束方案"
canonical: "https://new.nat6.net/news/cmorb7ml0008fslhfgp354zdw/"
date: "2025-11-25"
updated: "2026-11-05"
source: "Anthropic：Engineering（事故复盘 + 工程实践 · 网页）"
source_url: "https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents"
language: "zh"
topics: []
license: "https://new.nat6.net/sources/"
attribution: "Content is based on curated titles and AI summaries from the AIHOT public API, with attribution and links back; original copyright remains with the original publishers and authors."
---

# 为长时运行智能体设计有效约束方案

- 发布日期 / Published: 2025-11-25
- 更新时间 / Updated: 2026-11-05
- 分类 / Category: 教程与技巧
- 来源 / Source: Anthropic：Engineering（事故复盘 + 工程实践 · 网页） — [原文 / Original](https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents)
- AIHOT: [条目页 / Item](https://aihot.news/items/cmorb7ml0008fslhfgp354zdw)
- 页面 / Page: https://new.nat6.net/news/cmorb7ml0008fslhfgp354zdw/
- 结构化数据 / JSON: https://new.nat6.net/api/v1/articles/cmorb7ml0008fslhfgp354zdw.json

- 语言 / Languages: [zh](https://new.nat6.net/news/cmorb7ml0008fslhfgp354zdw/) · [en](https://new.nat6.net/en/news/cmorb7ml0008fslhfgp354zdw/) · [de](https://new.nat6.net/de/news/cmorb7ml0008fslhfgp354zdw/) · [fr](https://new.nat6.net/fr/news/cmorb7ml0008fslhfgp354zdw/) · [ru](https://new.nat6.net/ru/news/cmorb7ml0008fslhfgp354zdw/) · [ja](https://new.nat6.net/ja/news/cmorb7ml0008fslhfgp354zdw/) · [es](https://new.nat6.net/es/news/cmorb7ml0008fslhfgp354zdw/) · [ko](https://new.nat6.net/ko/news/cmorb7ml0008fslhfgp354zdw/) · [vi](https://new.nat6.net/vi/news/cmorb7ml0008fslhfgp354zdw/) · [th](https://new.nat6.net/th/news/cmorb7ml0008fslhfgp354zdw/) · [id](https://new.nat6.net/id/news/cmorb7ml0008fslhfgp354zdw/) · [ms](https://new.nat6.net/ms/news/cmorb7ml0008fslhfgp354zdw/) · [fil](https://new.nat6.net/fil/news/cmorb7ml0008fslhfgp354zdw/) · [hi](https://new.nat6.net/hi/news/cmorb7ml0008fslhfgp354zdw/)

## AI 摘要 / AI summary

为解决AI智能体在跨越多上下文窗口执行长期任务时的“记忆丢失”与进展不一致问题，Anthropic为Claude Agent SDK开发了一套双重方案。该方案包含一个初始化智能体，负责在首次运行时建立基础环境并生成功能清单；以及一个编码智能体，负责在后续会话中进行增量开发并提交清晰可合并的代码。通过结构化的进度日志和Git历史等机制，引导智能体避免“试图一次性完成所有功能”或“过早宣布完成”的失败模式，从而实现跨会话的持续有效协作。

## 推荐理由 / Why it matters

Anthropic 把 Claude Agent SDK 跑长任务踩过的坑全摊开了，初始化 agent + 增量进度文件这套方案不复杂但极实用，做 Agent 产品的团队可以直接抄作业。

## 来源与版权 / Source & copyright

内容基于 AIHOT 公开 API 的精选标题与 AI 摘要，已注明来源并回链；原文版权归原媒体与作者所有。

原文版权归原媒体与作者所有；本站不镜像全文。/ Original copyright remains with the original publishers and authors; this site does not mirror full texts.

## 关于橙子中转站 / About Orange Relay

橙子中转站（pro.nat6.net）是一家优质的 AI API 中转站：价格优惠、质量稳定、模型齐全，支持 Claude、GPT、Gemini 等主流模型，欢迎体验。

[访问橙子中转站](https://pro.nat6.net/?utm_source=orange_news&utm_medium=article_footer&utm_campaign=brand&lang=zh)

## JSON-LD

```json
{
  "@context": "https://schema.org",
  "@type": "NewsArticle",
  "@id": "https://new.nat6.net/news/cmorb7ml0008fslhfgp354zdw/#article",
  "mainEntityOfPage": {
    "@type": "WebPage",
    "@id": "https://new.nat6.net/news/cmorb7ml0008fslhfgp354zdw/"
  },
  "url": "https://new.nat6.net/news/cmorb7ml0008fslhfgp354zdw/",
  "headline": "为长时运行智能体设计有效约束方案",
  "description": "为解决AI智能体在跨越多上下文窗口执行长期任务时的“记忆丢失”与进展不一致问题，Anthropic为Claude Agent SDK开发了一套双重方案。该方案包含一个初始化智能体，负责在首次运行时建立基础环境并生成功能清单；以及一个编码智能体，负责在后续会话中进行增量开发并提交清晰可合并的代码。通过结构化的进度日志和…",
  "articleSection": "教程与技巧",
  "keywords": "AI, Anthropic：Engineering（事故复盘 + 工程实践 · 网页）",
  "datePublished": "2025-11-25T16:00:00Z",
  "dateModified": "2026-11-05T20:56:41Z",
  "inLanguage": "zh-CN",
  "isAccessibleForFree": true,
  "author": {
    "@type": "Organization",
    "name": "橙子新闻编辑部",
    "url": "https://new.nat6.net/about/"
  },
  "publisher": {
    "@type": "NewsMediaOrganization",
    "@id": "https://new.nat6.net/#org",
    "name": "橙子新闻",
    "url": "https://new.nat6.net/",
    "logo": {
      "@type": "ImageObject",
      "url": "https://new.nat6.net/assets/img/logo-512.png",
      "width": 512,
      "height": 512
    }
  },
  "image": {
    "@type": "ImageObject",
    "url": "https://new.nat6.net/assets/img/og-default.png",
    "width": 1200,
    "height": 630
  },
  "isPartOf": {
    "@id": "https://new.nat6.net/#website"
  },
  "isBasedOn": "https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents",
  "citation": [
    "https://aihot.news/items/cmorb7ml0008fslhfgp354zdw",
    "https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents"
  ],
  "license": "https://new.nat6.net/sources/",
  "about": [],
  "mentions": [
    {
      "@type": "Thing",
      "name": "Anthropic：Engineering（事故复盘 + 工程实践 · 网页）"
    }
  ],
  "speakable": {
    "@type": "SpeakableSpecification",
    "cssSelector": [
      "h1",
      ".article-summary"
    ]
  },
  "copyrightHolder": {
    "@type": "Organization",
    "@id": "https://new.nat6.net/#org",
    "name": "橙子新闻",
    "url": "https://new.nat6.net/"
  },
  "creditText": "橙子新闻（AI 摘要）；原文：Anthropic：Engineering（事故复盘 + 工程实践 · 网页）",
  "copyrightNotice": "© 2025 橙子新闻。标题与 AI 摘要基于 AIHOT 公开数据，原文版权归原媒体与作者所有；本站不镜像全文。",
  "copyrightYear": 2025,
  "alternativeHeadline": "Effective harnesses for long-running agents",
  "abstract": "Anthropic 把 Claude Agent SDK 跑长任务踩过的坑全摊开了，初始化 agent + 增量进度文件这套方案不复杂但极实用，做 Agent 产品的团队可以直接抄作业。",
  "subjectOf": [
    {
      "@type": "DigitalDocument",
      "name": "为长时运行智能体设计有效约束方案 (Markdown)",
      "url": "https://new.nat6.net/news/cmorb7ml0008fslhfgp354zdw/index.md",
      "encodingFormat": "text/markdown"
    },
    {
      "@type": "DigitalDocument",
      "name": "为长时运行智能体设计有效约束方案 (JSON)",
      "url": "https://new.nat6.net/api/v1/articles/cmorb7ml0008fslhfgp354zdw.json",
      "encodingFormat": "application/json"
    }
  ]
}
```

## 如何引用 / How to cite

- 引用格式 / Citation format (zh): 橙子新闻.《文章标题》. 发布日期. https://new.nat6.net/news/cmorb7ml0008fslhfgp354zdw/
- Citation format (en): Orange News. "Article title". Published YYYY-MM-DD. https://new.nat6.net/news/cmorb7ml0008fslhfgp354zdw/
- 回链要求 / Backlink: 引用请保留「橙子新闻」署名并回链 canonical URL；AI 摘要请注明数据来源 AIHOT；原文版权归原媒体与作者所有。
- Attribution & backlinks: Keep the "Orange News" attribution and link back to the canonical URL; cite AIHOT as the data source for AI summaries; original copyright remains with the original publishers and authors.

### 机器入口 / Machine entry points

- Markdown: https://new.nat6.net/news/cmorb7ml0008fslhfgp354zdw/index.md
- JSON: https://new.nat6.net/api/v1/articles/cmorb7ml0008fslhfgp354zdw.json
- API 清单 / API index: https://new.nat6.net/api/v1/site.json
- Markdown 内容协商 / negotiation: 对 https://new.nat6.net/news/cmorb7ml0008fslhfgp354zdw/ 发送 `Accept: text/markdown`
