Claude Code side calls: use --safe-mode so the judge and proposer don't load the user's customizations
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- python
調査の方向性
Read sidecall.claude_call and the existing claude_flags() detection for --no-session-persistence. Add the conditional --safe-mode flag to side-call invocations, keeping the measure and refresh-catalog probes unchanged. Check the side-call tests and verify behavior with and without the flag in claude --help; done when only supported Claude Code versions receive the flag and both probes still load customizations.
索引モデルが issue の本文から書いたものです。
説明
Context
Since #89, sidecall.claude_call runs claude -p --output-format json --max-turns 1 --tools "" --model haiku
with --strict-mcp-config and an empty MCP config, which removed the MCP cost. The call still loads everything
else from the user's setup: CLAUDE.md files, installed plugins and their SessionStart / UserPromptSubmit
hooks, skills, output styles.
On a setup with a shared team config (rtk, caveman, ponytail, a few plugins, a UserPromptSubmit classifier
hook), te toolprune measure reports a lean prompt of ~26k tokens for an empty Claude Code session (Claude Code
2.1.319, Linux). Each judge or proposer call pays that context, and the user's hooks run inside it: a
SessionStart hook that starts background updates, or plugins that inject style instructions into the reply,
can change both the cost and the shape of the JSON answer the plugin parses.
Proposal
Add --safe-mode to the Claude Code side-call flags when claude --help lists it, the same way
claude_flags() already detects --no-session-persistence. claude --help describes it as "Start with all
customizations (CLAUDE.md, skills, installed plugins, hooks, MCP servers, custom commands and agents, output
styles, workflows, …) disabled". TE_SIDECALL=1 would still be useful for older Claude Code versions without the
flag.
The measure and refresh-catalog probes should keep loading the user's setup: they measure the real session.
Environment
TokenEconomizer 0aa2aca, Claude Code 2.1.319, Linux, Python 3.14.
- 主要言語
- Python
- スター
- 5.6k
- フォーク
- 344
- 平均マージ
- 14時間 41分
- マージ済み PR(30日)
- 54
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/TokenEconomizer のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
microsoft/TokenEconomizer#193 ·
メンテナーはふだん 1 日以内に返信
-
pricing: Claude's 1-hour cache writes are priced at 1.25x, but billed at 2x対応中かも @anascherif が今日担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
microsoft/TokenEconomizer#191 ·
メンテナーはふだん 1 日以内に返信
-
trace: Claude Code's `<synthetic>` notices count as requests and can make a Claude session price on the fallback curve対応中かも @1AbdullahButt が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 20/100
microsoft/TokenEconomizer#189 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
microsoft/TokenEconomizer#186 ·
メンテナーはふだん 1 日以内に返信
-
plugin: the agent-output readers crash on a JSON line that is not an object対応中かも @rahul05ranjan が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 25/100
microsoft/TokenEconomizer#182 ·
メンテナーはふだん 1 日以内に返信
microsoft/TokenEconomizer の issue をすべて見る
似ている issue
-
area: providers/aws priority: p2 size: S type: bug type: testing
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
finos/open-resource-broker#851 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
sandialabs/atlas-ui-3#1196 ·
メンテナーはふだん 1 日以内に返信
-
enhancement triage
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
ShaftHQ/SHAFT_ENGINE#7902 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: GraphML export writes invalid XML when a value contains a control character (e.g. form feed)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
topoteretes/cognee#6646 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
DOI-USGS/pywatershed#428 ·