# v1.2.1 Release Notes

> v1.2.0 -> v1.2.1

## Summary

Restructures the agent executor into focused packages, with subagents now running through the main execution loop. Unifies error messages under a fixed category label so agents and logs can classify failures directly. Prompt templates are reorganized and generated files gain pre-write validation.

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

將代理執行器拆成多個專責套件，子代理改走主執行流程。錯誤訊息統一加上固定分類標示，讓代理與日誌能直接判斷錯誤類型。提示模板重新整理，產出檔案新增寫入前驗證。

</details>

## Changes

### FEAT

- Add pre-write HTML validation to `write_result` that rejects pages with inline script syntax errors or invalid template bindings, and tighten the HTML render guide (@pardnchiu) [0b875773]
- Let `open_file` open URLs and system settings schemes in addition to files, always asking the user to confirm a URL (@pardnchiu) [ad05c01e]

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

- `write_result` 新增寫入前的 HTML 驗證，拒絕 inline script 語法錯誤或模板綁定不合法的頁面，並收緊 HTML render guide
- `open_file` 除了檔案，也能開啟 URL 與系統設定 scheme；開啟 URL 一律需要使用者確認

</details>

### UPDATE

- Run subagents through the main execution loop with per-call model and reasoning, default subagent reasoning to `auto`, and reject an invalid reasoning level instead of silently falling back to low (@pardnchiu) [ad05c01e, 60d2e7ca]
- Order model candidates that share the same base model by provider rank during selection (@pardnchiu) [4201d46a, b45f92e5]
- Rewrite error and log messages across the codebase, including HTTP error bodies, to the `[Label] target: reason` format, and name failing calls by package alias instead of full import path (@pardnchiu) [ad05c01e, 616be53f, c988a29c, b8917bff, 95039590]
- Replace the RAG web guide with web search guidance, tighten the `write_todo` and `reasoning_guide` prompts, and keep `reasoning_guide` loaded alongside `find_tools` and `run_tool` (@pardnchiu) [754d013d, 6e328f3c]

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

- 子代理改走主執行流程，每次呼叫可指定 model 與 reasoning；子代理 reasoning 預設改為 `auto`，不合法的 reasoning 等級改為回傳錯誤，不再靜默退回 low
- 模型選擇時，同一個基礎模型的候選依 provider 排名排序
- 全專案的錯誤與 log 訊息（含 HTTP 錯誤內容）改寫為 `[Label] target: reason` 格式，出錯呼叫改以套件 alias 命名，不再寫完整 import path
- 以 web search 指引取代 RAG web guide，收緊 `write_todo` 與 `reasoning_guide` 提示，並讓 `reasoning_guide` 與 `find_tools`、`run_tool` 一同載入

</details>

### REFACTOR

- Split the executor into `exec/model` for model selection, `exec/subagent` for subagent execution and `exec/chatbot` for the admin channel notifier, and rename the model registry to `ModelSet` (@pardnchiu) [4201d46a, b45f92e5, 60d2e7ca, 5c8bafc5]
- Rename `exec.Start` to `exec.Run` and merge the session reset helpers into a single `Reset` with a summary switch (@pardnchiu) [ad05c01e, 616be53f]
- Merge the allow-list helpers into `Load` and `Toggle` with an optional work directory (@pardnchiu) [c988a29c, b8917bff, 95039590]
- Route all error construction through a shared `utilsmsg` helper with `New`, `Wrap` and `Trace` (@pardnchiu) [b8917bff, 95039590]
- Reorganize prompt templates under `system_prompt` and move runtime and turn-context injections into embedded templates (@pardnchiu) [6f5872da, b9943b2d]
- Normalize naming and import grouping to Go conventions (@pardnchiu) [7bf36863, cbbca0e9]

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

- 執行器拆出 `exec/model`（模型選擇）、`exec/subagent`（子代理執行）與 `exec/chatbot`（admin channel 通知），模型註冊表更名為 `ModelSet`
- `exec.Start` 更名為 `exec.Run`，session reset 輔助函式合併為帶摘要開關的單一 `Reset`
- 允許清單輔助函式合併為可選工作目錄的 `Load` 與 `Toggle`
- 所有錯誤建構統一改走共用的 `utilsmsg`（`New`、`Wrap`、`Trace`）
- 提示模板移到 `system_prompt` 下重新整理，runtime 與 turn-context 注入改為內嵌模板
- 命名與 import 分組統一為 Go 慣例

</details>

### ADD

- Add official prompt guides for `claude-haiku-5.5` and `claude-sonnet-5.5` (@pardnchiu) [f28c8f01]

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

- 新增 `claude-haiku-5.5` 與 `claude-sonnet-5.5` 的官方提示指引

</details>

### REMOVE

- Remove the obsolete `.openai` skill source from skill scanning (@pardnchiu) [70546a34]

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

- 自技能掃描移除已過時的 `.openai` 來源

</details>

## Scope

- `internal/agents/exec/` — REFACTOR, UPDATE, ADD (multiple files)
- `internal/agents/exec/model/` — REFACTOR, UPDATE, ADD (multiple files)
- `internal/agents/exec/subagent/` — REFACTOR, UPDATE, ADD (`exec.go`, `ensureSession.go`, `sendEvent.go`, `waitResume.go`)
- `internal/agents/exec/allow/` — REFACTOR, UPDATE (multiple files)
- `internal/tools/` — FEAT, UPDATE, ADD (`openFile.go`, `file/htmlCheck.go`, `file/writeResult.go`, `subagent/invoke.go`)
- `internal/session/config/` — UPDATE (`tier.go`)
- `internal/runtime/` — UPDATE, REFACTOR, REMOVE (multiple files)
- `internal/filesystem/`, `internal/startup/`, `internal/app/`, `internal/sudo/` — UPDATE (multiple files)
- `internal/utils/msg/` — ADD, REFACTOR (`msg.go`)
- `configs/prompts/system_prompt/` — REFACTOR, ADD (multiple files)
- `configs/prompts/guide/` — UPDATE (multiple files)

***

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