Skip to content

fix(codebuddy): clarify reload and source stats#208

Open
hxy91819 wants to merge 1 commit into
vincentkoc:mainfrom
hxy91819:feature/codebuddy-reload-source-stats
Open

fix(codebuddy): clarify reload and source stats#208
hxy91819 wants to merge 1 commit into
vincentkoc:mainfrom
hxy91819:feature/codebuddy-reload-source-stats

Conversation

@hxy91819

@hxy91819 hxy91819 commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • clarify that CodeBuddy snapshots hook settings at session startup and needs a restart or /hooks confirmation after external settings edits
  • switch CodeBuddy install output to the structured success format with reload and verification guidance
  • make stats --by-source easier to inspect by sorting sources by raw observed cost, showing raw/reduced/saved metrics, and explaining historical source unknown entries

Real environment validation

  • In an isolated clean environment, tokenjuice install codebuddy --local wrote ~/.codebuddy/settings.json with a managed hooks.PreToolUse entry using matcher Bash.
  • A newly started shell/CodeBuddy process with the same HOME could read the installed hook via codebuddy config get hooks.
  • A different CODEBUDDY_CONFIG_DIR did not see the hook, and tokenjuice doctor codebuddy correctly reported it disabled for that config dir.
  • The full interactive /hooks panel was not fully exercised in the clean TUI run because CodeBuddy stopped at the workspace trust prompt, but the config-level behavior matched the suspected reload/snapshot issue.
  • The CodeBuddy hook rewrite path produces tokenjuice wrap --source codebuddy -- ..., and tokenjuice stats --source codebuddy --by-source counts those entries separately.
  • On the current real environment, CodeBuddy stats are present as source codebuddy: 361 entries, 428,977 raw chars, 341,033 saved chars.
  • Local artifact sampling showed source unknown was historical metadata without a source field: 3,064 missing source values, 0 invalid source values, concentrated from 2026-04-21 through 2026-04-26.

Validation

  • pnpm typecheck
  • pnpm build
  • env -u TOKENJUICE_NO_OMISSION pnpm verify

Notes

The observed CodeBuddy issue appears to be runtime reload behavior rather than install-time settings corruption: CodeBuddy can read the written config, but an already-running session keeps its startup snapshot until restarted or confirmed through /hooks.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants