claude-agent: plugins that edit earlier messages make every turn fork the Claude Code session
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 22/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- backend
調査の方向性
The fork is decided in sync/decide.ts, which reports a change whenever any earlier message's content hash differs, and sessions.ts then forks the Claude Code session; instructions.ts drops system[0]. Start by reading those three files and reproducing with a multi-turn session that edits an earlier message. Done means later turns resume the same session when only earlier content changed, or plugin system text reaches Claude, with a test covering both cases.
索引モデルが issue の本文から書いたものです。
説明
Description
I use Magic Context with the claude-agent provider. With the plugin on, every turn creates a new Claude Code session forked from the previous one, instead of continuing the same one.
Quick test on 2.4.2, 5 short turns with claude-sonnet-5:
- without the plugin: 1 transcript in ~/.claude/projects
- with Magic Context 0.49.89: 5 transcripts, 4 of them with forkedFrom, and 10 synthetic "No response requested." messages
From what I can see in the code:
- sync/decide.ts returns "changed" as soon as the content of any earlier message differs from the saved hash, and sessions.ts then forks.
- instructions.ts drops system[0]. Magic Context puts its instructions there, so Claude never sees them, the plugin rewrites the reply afterwards, and the next turn forks.
Magic Context closed their side as not planned, since editing earlier history is what the plugin does: https://github.com/cortexkit/magic-context/issues/970
#65227 hides the "No response requested" messages, but the forks stay.
Two things would fix it for me:
- Pass plugin text in system[0] through to Claude, or tell plugin authors to use their own system part.
- Optionally keep the Claude session going when only the content of earlier messages changed, matching messages by OpenCode message ID instead of by content. The old opencode-claude plugin had a draft for this: openchamber/opencode-claude#76
Plugins
@cortexkit/[email protected]
OpenCode version
2.4.2
Steps to reproduce
- Enable a plugin that edits earlier messages (Magic Context for example).
- Send 5 short turns to a claude-agent model in the same session.
- Look at ~/.claude/projects//: 5 transcripts instead of 1.
Operating System
Ubuntu 26.04 (WSL2)
- 主要言語
- TypeScript
- スター
- 230k
- フォーク
- 31.3k
- 平均マージ
- 5時間 32分
- マージ済み PR(30日)
- 453
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
anomalyco/opencode のほかの issue
-
area/desktop platform/macos status/repro-plausible type/bug version/v2
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
anomalyco/opencode#67064 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 半日 初心者へのやさしさ 82/100
anomalyco/opencode#67009 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
area/web type/feature version/v2
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
anomalyco/opencode#67001 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
skills: a Claude-compatible SKILL.md that fails to parse is dropped without any log対応中かも @liwenjie200543 が 2 日前に担当しました。 オープンarea/plugins platform/linux reproduced type/bug version/v2
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
anomalyco/opencode#66970 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
tui: Mermaid renderer displays <b>/<strong> tags literally and ignores \n line breaks対応中かも @argszero が 2 日前に担当しました。 オープンarea/tui platform/wsl status/repro-simulated type/bug version/v2
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
anomalyco/opencode#66773 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
anomalyco/opencode の issue をすべて見る
似ている issue
-
enhancement feature/signals self-driving team/self-driving
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
PostHog/posthog#144208 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug good first issue web
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
triage: not actionable
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
oxc-project/oxc#30518 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug Claude useability
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
wazuh/wazuh-dashboard-plugins#9751 ·
メンテナーはふだん 1 日以内に返信