Releases: CleanSlice/runtime
v0.21.0
Full Changelog: v0.20.0...v0.21.0
v0.20.0 — resource_status tool + delayed-turn hint
Agent self-awareness of operating resources
The agent can now inspect its own LLM/system resources and gets nudged when something is wrong.
New tool: resource_status (admin-only)
Returns a structured snapshot:
- llm — provider, model, context window, OAuth/API credentials with per-token cooldown state (
cooldownUntilMs,consecutive429s),anyAvailableNow,soonestAvailableMs,primaryOverloaded. - usage — today's
totalInputTokens/totalOutputTokens/totalCallCount. - system — container
rssBytes,memoryLimitBytes,memoryUsagePct,cpuPercent,cpuQuotaPct. Reads cgroup v2 → falls back to v1 → degrades to host (macOS / non-Docker) with just RSS + CPU%. - lastTurn — duration, retry count, rate-limited / overloaded flags of the previous LLM call.
Auto-hint on delayed turns
After any LLM turn that took more than 30s, hit a retry, was rate-limited, or saw an overloaded_error, the runtime injects a one-shot # Resource Notice block into the next system prompt:
Your previous turn took 45s (retries=2, rate-limited). If you suspect resource pressure, call the
resource_statustool…
The hint fires exactly once per delayed turn (consume-on-read).
Under the hood
ClaudeRepository.getResourceSnapshot()exposes the private OAuth pool +tokenStatesvia a normalized DTO.withRetrytracks retries / rate-limit / overload and attaches them toModelResponse.meta.- New
LastTurnStatsTrackerlives onLoopService;RuntimeService.buildPromptconsumes it per turn. LlmModule.getResourceSnapshot()returns a minimal stub for non-Claude providers so the tool stays callable.BuildPromptOpts.extraHintis the generic injection point for the next-turn nudge.
Full Changelog: v0.19.13...v0.20.0
v0.19.12
Full Changelog: v0.19.11...v0.19.12
v0.19.11
Full Changelog: v0.19.10...v0.19.11
v0.19.10
Full Changelog: v0.19.9...v0.19.10
v0.19.9
Full Changelog: v0.19.8...v0.19.9
v0.19.8
Full Changelog: v0.19.7...v0.19.8
v0.19.7
Full Changelog: v0.19.6...v0.19.7
v0.19.6
Full Changelog: v0.19.5...v0.19.6
v0.19.5
Full Changelog: v0.19.4...v0.19.5