small gleam coding and persistent agent daemon with a detachable cli and a canvas ui albedo.sh

Web client continuously refetches pending context summaries while idle #131

Closed okami.mom
Closed opened by okami.mom

With a couple of idle session windows open, the web client makes continuous context?view=summary requests, causing very high CPU usage. Two idle windows issue around 600 requests every second

The responses for these requests look like this:

{
    "state": "pending",
    "snapshot_id": null,
    "captured_at": null,
    "provider": null,
    "model": null,
    "protocol": null,
    "context_window_tokens": null,
    "compaction": {
        "strategy": null,
        "status": "unknown",
        "source": null,
        "trigger_free_percent": null,
        "input_limit_tokens": null,
        "estimated_input_tokens": null,
        "provider_input_tokens": null,
        "provider_cached_input_tokens": null,
        "estimate_method": null,
        "before_items": null,
        "after_items": null
    },
    "sections": [],
    "reason": {
        "code": "context_pending",
        "detail": "runtime session has not prepared a provider request"
    }
}

I'd be happy to contribute a fix a bit later when I get a chance, if that would be helpful.

oof yea i still need to do proper profiling of stuff to catch more crap like this

dawn is telling me shes already aware of why its like this and will get it fixed soon, thanks for the issue! ❤️

i pushed my own fix with a recent commit

Sign up or Sign in to add to the discussion.