CommandCodeAI / CommandCodeAI/command-code
/learn-taste learns nothing from Codex sessions: extractor only reads legacy event_msg/user_message format
まだ誰も着手していません。
- 主要言語
- 言語のデータがありません
- スター
- 4k
- フォーク
- 350
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
What happens
/learn-taste (and cmd learn-taste) finds my Codex sessions but learns nothing from them. Taste onboarding ends with "TASTE Skipped", and ~/.commandcode/taste/ stays empty. Projects whose history is Codex-only get zero taste signal.
Environment
- Command Code v1.53.1 (
command-codenpm global,cmdc), Windows 11, PowerShell - Codex CLI 0.154.0, sessions at
~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl
Root cause: stale Codex prompt extractor
The session finder works (3-level YYYY/MM/DD walk + rollout-*.jsonl + session_meta.payload.cwd project match). But extractCodexPrompts only accepts lines shaped as:
{ "type": "event_msg", "payload": { "type": "user_message", "message": "..." } }
That shape no longer exists in Codex rollouts. Verified on this machine:
- Newest rollout (Sept 2026): 165 lines, 62
event_msg, 0 withpayload.type: "user_message".event_msgpayloads are onlyitem_completed,token_count,task_started,task_complete. - Search for
"user_message"across all September rollouts: 0 hits. A May 2026 archived rollout: also 0. - Conversation turns now live in
response_itementries:
{ "type": "response_item", "payload": { "type": "message", "role": "user", "content": [{ "type": "input_text", "text": "..." }] } }
(role is user / assistant / developer; user text parts use type: "input_text", assistant uses output_text.)
So extraction always yields [] → nothing to learn.
Suggested fix
In extractCodexPrompts, also handle type: "response_item" with payload.type: "message" and payload.role: "user", joining payload.content[].text for input_text parts. (Note: some role: "user" items are injected context like <environment_context> / skills text — you may want to skip those or let the taste model filter them.)
Secondary issue: case-sensitive cwd match on Windows
The project filter compares session_meta.payload.cwd === projectPath exactly. On Windows, recorded cwd case varies between sessions (e:\development\... vs E:\development\...), so matches are silently missed. Suggest case-insensitive comparison + separator normalization on win32.
Repro
- Have Codex-only history in a project (any recent Codex CLI).
- Run
cmdc, then/learn-taste(orcmdc learn-taste) from that project dir. - Observe: sessions are scanned, but no taste is learned.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
extractCodexPrompts から開始し、/learn-taste と cmd learn-taste で使用されているセッション処理をたどってください。response_item エントリ内のユーザーメッセージを処理し、続いて session_meta.payload.cwd のプロジェクトフィルターについて、Windows における大文字と小文字および区切り文字の違いを確認してください。最近の Codex のみのセッションから taste の入力が生成され、Windows で一致するプロジェクトパスが暗黙にスキップされなければ完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- node.js
- 領域
- cli
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 活発
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 72/100