Desktop UI: agent keeps running & billing after UI freeze; stop button unresponsive; forked sessions multiply input costs #2460
2602065761
started this conversation in
General
Replies: 1 comment
|
@liustack the multiply-billing-after-freeze pattern usually means each forked session holds its own stream and the parent never receives the cancel. Two things that helped us reproduce similar cases: tag every fork with a parent session id at spawn, and make the stop path idempotent per tag so the second press actually propagates. Did you see the forks keep streaming server-side, or was the billing purely from local retries? |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Desktop UI: agent keeps running & billing after UI freeze; stop button unresponsive; forked sessions multiply input costs
Environment
DeepSeek-Harness-Desktop-0.1.0-Setup.exe)web, plugins:@liustack/modlens,@liustack/modsearchSummary
Three related issues that combined into a surprise 15 CNY (~$2) bill for a single "failed" turn, draining my balance to negative:
UI freeze while the agent keeps running in the background. The desktop UI showed the turn as stuck/failed, the Stop button did nothing - but the host actually completed all 17 steps of that turn (verified in
session.jsonl.zstd: fullassistant/message,tool/call,tool/resultevents from 18:52 to 19:12). Every step was billed normally. The user sees "failure" while the API bill keeps growing.Session forking duplicates the accumulated context. One conversation exists as 3 sessions, each carrying the full ~370K-token history. Resuming/continuing a session appears to seed a copy rather than reuse, tripling the base context that gets re-sent (and billed) on every step.
Aggressive billing defaults with no cost guardrails. Fresh install defaults to
deepseek-v4-pro+reasoningEffort: max, with no budget cap, no low-balance warning, and no visible per-turn cost. Combined with the 1M context window (no auto-compaction), each step re-sends the whole history at full input price once the prompt cache expires (after a ~12h gap, cache hit rate dropped from ~99% to 0%).Steps to reproduce (issue 1)
Evidence
Session log stats (from
~/.dsh/storages/session_projcache.json):Official usage export for 2026-08-16 matches:
The afternoon turn (18:51-19:12, 17 steps) alone cost ~15 CNY: every step re-sent a 370K-token context at the cache-miss price because the overnight gap had expired the prompt cache, while the UI showed nothing but a stuck turn.
Expected behavior
Workaround (for other users hitting this)
~/.dsh/settings.yaml(and the web profile's copy) set:agent-default-model: { model: deepseek-v4-flash, reasoningEffort: medium }Happy to provide the full
session.jsonl.zstdexports privately if needed.All reactions