> v1.1.2 -> v1.1.3

## Summary

Keeps the claude-code prompt cache intact with per-prompt process isolation and on-demand tool schemas, reports provider quota across multiple remaining windows, and quiets TUI notices while consolidating response-handling regexes.

<details>
<summary>翻譯</summary>

透過依提示隔離程序與按需取得工具定義維持 claude-code 快取命中，以多個剩餘額度視窗呈現供應商用量，並收斂 TUI 提示訊息與回應處理的 regex。

</details>

## Changes

### FIX

- Isolate claude-code processes by model and system prompt hash, so requests with a different system prompt no longer restart a shared process and wipe its cache; any request with a session now uses a long-lived process whether or not it carries tools (tool-less requests get their own process), and state files move to a `.claude_code` folder inside the session directory (@pardnchiu) [f32af8a8, 557c4d9c]
- Stub every claude-code tool except `find_tools` and client tools until its schema is fetched, so a call made without the schema returns the schema instead of running with guessed arguments (@pardnchiu) [557c4d9c]
- Show provider quota as remaining windows (5-hour, weekly, total) or balance joined by `/` in the TUI and WebUI, colored by the lowest window; claude-code usage now reports both its session and weekly windows, and the provider quota endpoint returns a `remaining` object in place of `kind` and `value` (@pardnchiu) [f620effc, a750e038]
- Queue agent events while a TUI popup is open and replay them in order once it closes (@pardnchiu) [d06b36c3]

<details>
<summary>翻譯</summary>

- 依 model 與 system prompt 雜湊隔離 claude-code 程序，system prompt 不同的請求不再重啟共用程序而清掉快取；有 session 的請求不論是否帶 tools 一律使用常駐程序（無 tools 的請求使用獨立程序），狀態檔改存於 session 目錄下的 `.claude_code` 資料夾
- claude-code 除 `find_tools` 與 client tools 外的工具一律先標為 stub，未取得 schema 就呼叫時改為回傳 schema，不再以猜測的參數執行
- 供應商用量改以剩餘額度視窗（5 小時、每週、總量）或餘額呈現，TUI 與 WebUI 以 `/` 串接並依最低值上色；claude-code 用量同時回報 session 與每週視窗，用量 endpoint 以 `remaining` 物件取代 `kind` 與 `value`
- TUI 彈窗開啟期間的 agent 事件改為排入佇列，待彈窗關閉後依序重播

</details>

### UPDATE

- Move TUI success notices to debug logs and highlight the session ID in white (@pardnchiu) [6ba55dc6]
- Move the think and summary-leak regexes to configs and match only a leading `<think>` block; the stream emitter shares the same regex and waits for 7 characters before deciding whether a think tag is present (@pardnchiu) [b6efb62e]
- Stop stripping legacy `<summary>` and `[summary]` blocks from model output and drop the related rules from the system and summary prompts (@pardnchiu) [b1db55ce]
- Add a self-repair section to the skill execution prompt (@pardnchiu) [4a93421a]

<details>
<summary>翻譯</summary>

- TUI 成功提示改寫入 debug 日誌，並以白色顯示 Session ID
- 將 think 與摘要洩漏 regex 移至 configs，並改為僅比對開頭的 `<think>` 區塊；串流輸出共用同一條 regex，並以 7 個字元判斷是否出現 think 標籤
- 不再移除模型輸出中舊式的 `<summary>` 與 `[summary]` 區塊，並刪除 system prompt 與摘要 prompt 中的相關規則
- 於 skill 執行提示新增自我修復規則

</details>

### REFACTOR

- Share one message-prefix regex from configs across session history, exec, TUI and claude-code in place of the `StripPrefix` and `HasPrefix` helpers (@pardnchiu) [b1db55ce]
- Rename exec helpers (`checkAgentAlive`, `GetOldestMessageTime`, `Response`, `guardrailRule`), replace `ExecuteMeta.ModelName()` with `Agent.Name()` and simplify the agent liveness check; the guardrail debug log now reads `refusal` with a `rule` field (@pardnchiu) [4656a851, ca5b8296]

<details>
<summary>翻譯</summary>

- 以 configs 內單一訊息前綴 regex 取代 `StripPrefix` 與 `HasPrefix`，供 session history、exec、TUI 與 claude-code 共用
- 重新命名 exec 輔助函式、以 `Agent.Name()` 取代 `ExecuteMeta.ModelName()` 並簡化 agent 存活檢查；guardrail debug 日誌改為 `refusal` 並以 `rule` 欄位呈現

</details>

## Scope

- `internal/agents/claudeCode/` — FIX, REFACTOR (`agent.go`, `process.go`, `usage.go`)
- `internal/agents/exec/` — FIX, UPDATE, REFACTOR (`execute.go`, `streamText.go`, `response.go`, `checkAgentAlive.go`, `getSession.go`)
- `internal/runtime/tui/` — UPDATE, FIX, REFACTOR (multiple files)
- `internal/runtime/routes/handler/` — FIX (`providerQuota.go`)
- `internal/utils/` — FIX (`event.go`)
- `internal/session/` — REFACTOR (`history/record.go`, `log/compact.go`)
- `internal/tools/history/action/` — REFACTOR (`search.go`)
- `configs/` — UPDATE, REFACTOR (`configs.go`, `prompts/`)
- `page/src/js/` — FIX (`_event.js`, `_model_config.js`)
- `go.mod` — FIX

***

Generated by [SKILL](https://github.com/pardnchiu/skill-version-generate)