2 ms·
I set my env up so I can see the exact context used in CC CLI, and then once I get over about 40% ctx used I have it handoff to a new, fresh session. Nothing go
by boc 1mo ago
I set my env up so I can see the exact context used in CC CLI, and then once I get over about 40% ctx used I have it handoff to a new, fresh session. Nothing good comes from running above, say 60% of your context window. Coincidently, I usually have good results with CC. I never compact a session ever.
- jen729w 1mo agoThis is the way. Mine looks like `ctx: 0k / Fable 5 high`. When ctx ⪆ 200k, time to start a new session. ```statusline-command.sh #!/bin/sh input=$(cat) model=$(echo "$input" | jq -r '.model.display_name // empty' | sed 's/ context)/)/') effort=$(echo "$input" | jq -r '.effort.level // empty') used=$(echo "$input" | jq -r '.context_window.total_input_tokens // empty') out="" [ -n "$used" ] && out="ctx: $(( used / 1000 ))k" [ -n "$model" ] && out="$out / $model" [ -n "$effort" ] && out="$out $effort" # bright yellow + bold printf '\033[1;93m%s\033[0m' "$out" ```