claudecodeui icon indicating copy to clipboard operation
claudecodeui copied to clipboard

Using claudecodeui corrupts usage data?

Open odeemi opened this issue 1 year ago • 4 comments

I've noticed that in days I used claudecodeui the usage in ccusage (https://github.com/ryoppippi/ccusage) doesn't hold true but is multiplied. Is it possible that this tool somehow modifies/corrupts the Claude Code JSONL files at ~/.claude/projects/ ? Duplicate entries or incorrect token counts?

Had anyone noticed the same?

Image

odeemi avatar Jul 10 '25 13:07 odeemi

I noticed something related to this. I was getting 'Prompt too long' errors for a short sentence prompt. It seemed as if claudecodegui was passing the entire conversation as a prompt after resuming the session. Or something similar.

After jumping into the code and trying to resolve this myself, I tried again and got my session auth revoked from Anthropic. It's almost as if claudecodegui is bypassing some functionality of Claude Code CLI, allowing it to go over the usual usage that I would be able to in a single session. It also does not seem to compact conversations when it should.

jeremiahsmithdev avatar Jul 10 '25 13:07 jeremiahsmithdev

Hmm I see. I think the problem is this one actually https://github.com/anthropics/claude-code/issues/2354#issuecomment-2992125077 Specifically @levpopov mentions that resume creates a new session and that somehow in non-interactive mode (what claudecodeui is using) is expected. Can you leave a comment in that issue perhaps hoping that claude code fixes it?

viper151 avatar Jul 10 '25 18:07 viper151

Nice app but chews pro plan in 2hr ish when resuming, which i believe happens a lot on phone. Any way to mitigate this, keep same Claude/session open?

LiamKarlMitchell avatar Aug 30 '25 22:08 LiamKarlMitchell

This should have now been fixed. The session management from typscript sdk is supposed to do auto compact but even if it doesn't there is now a token tracker that you can use to remind yourself to do /compact

viper151 avatar Oct 31 '25 01:10 viper151