← 回總覽

Codex/Claude Code 上下文压缩实际体验与配套功能分享

📅 2026-06-28 00:19 宝玉 人工智能 4 分鐘 4143 字 評分: 86
Codex Claude Code 上下文压缩 Prompt Caching fork
📌 一句话摘要 作者分享使用 Codex 和 Claude Code 的上下文压缩、Prompt Caching 体验,并介绍 fork 和 /btw 两个实用功能。 📝 详细摘要 宝玉结合实践说明当前 AI 编码工具的上下文处理已很高效,加上 Prompt Caching 降低了持续会话的成本,因此他现在更倾向于在单一 session 内持续任务。文章重点介绍了两个配套功能:fork(从历史位置开分支,保留前文但让上下文更纯粹)和 /btw 或 /side(在不干扰主对话的前提下提问,例如在 plan 模式中请求解释选项)。这些技巧对深度使用 AI 编码工具的开发者有实际参考价值。 📊

Title: Hands-on with Codex/Claude Code Context Compression and U...

URL Source: https://www.bestblogs.dev/status/2070904833939329477?amp%3Butm_medium=feed&%3Butm_campaign=resources&%3Bentry=rss_article_item

Published Time: 2026-06-28 00:19:22

Markdown Content: Skip to main contentAudio 2 ![Image 1: LogoBest Blogs](https://www.bestblogs.dev/ "BestBlogs.dev")

Search Ctrl+K

Change language Switch ThemeSign In

Curated Daily BriefWeekly PicksTopicsWorld Cup Special SettingsHelp CenterCollapse

Narrow Mode

Hands-on with Codex/Claude Code Context Compression and Utility Features

Hands-on with Codex/Claude Code Context Compression and Utility Features

![Image 2: 宝玉](https://www.bestblogs.dev/en/tweets?sourceId=SOURCE_2c263f) 宝玉

@dotey

现在 Codex/Claude Code 的上下文压缩确实做的挺好了,加上 Prompt Caching,一个 Session 内持续聊没那么大成本压力了。我现在也越来越多的在一个会话内继续任务。

另外还有两个配套功能是很好的:

  • fork,就是从某一个对话位置开分支,只保留该对话前面的历史记录,让上下文更纯粹
  • /btw或者/side,在当前会话中提问,通常用于你想起来一件跟当前任务关系不大的事,没必要加入当前上下文中。
比如说使用 plan 模式时,你要回答一堆问题,但是这些问题选项说的不是很清楚你也不知道该选什么,这时候最适合用 /btw 让详细解释一下每个选项的意思,甚至还可以让它给你建议。Show More

!Image 3: Vaibhav (VB) Srivastav

#### Vaibhav (VB) Srivastav

@reach_vb · 5h ago

True story: I stopped thinking about context since GPT 5.3 Codex

Single project focused threads with the recent capability of codex to spinoff new threads is goated!

Codex continues and goes through compaction but remembers all the important stuff and if not, it’ll look up through the session and find the relevant info

This is also the reason why /goal is so effective as well Show More

59

6

303

31.4K

Jun 27, 2026, 4:19 PM View on X

4 Replies

4 Retweets

36 Likes

6,174 Views ![Image 4: 宝玉](https://www.bestblogs.dev/en/tweets?sourceid=2c263f) 宝玉 @dotey

Follow

One Sentence Summary

The author shares hands-on experience with context compression and Prompt Caching in Codex and Claude Code, and introduces two practical features: fork and /btw.

Summary

dotey explains through practice that context compression in current AI coding tools is already highly efficient. Combined with Prompt Caching, the cost of sustained sessions is significantly reduced, so he increasingly prefers to continue tasks within a single session. The article highlights two utility features: fork (branching from a point in conversation history, retaining prior context but making it cleaner) and /btw or /side (asking questions without disrupting the primary conversation — for example, requesting option explanations in plan mode). These tips offer practical value for developers who use AI coding tools extensively.

AI Screening

86

Influence Score 9

Published Today

Language

Chinese

Tags

Codex

Claude Code

Context Compression

Prompt Caching

fork

Make your daily reading actually fit you.A daily brief built from the sources you follow. Get started free HomeDiscoverWorld CupSettings

查看原文 → 發佈: 2026-06-28 00:19:22 收錄: 2026-06-28 02:00:41

🤖 問 AI

針對這篇文章提問,AI 會根據文章內容回答。按 Ctrl+Enter 送出。