You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**`auto-update-checker`와 `startup-toast`에 대한 참고사항**: `startup-toast` 훅은 `auto-update-checker`의 하위 기능입니다. 업데이트 확인은 유지하면서 시작 토스트 알림만 비활성화하려면 `disabled_hooks`에 `"startup-toast"`를 추가하세요. 모든 업데이트 확인 기능(토스트 포함)을 비활성화하려면 `"auto-update-checker"`를 추가하세요.
877
877
@@ -923,7 +923,7 @@ OpenCode 에서 지원하는 모든 LSP 구성 및 커스텀 설정 (opencode.js
923
923
```json
924
924
{
925
925
"experimental": {
926
-
"preemptive_compaction": true,
926
+
"preemptive_compaction_threshold": 0.85,
927
927
"truncate_all_tool_outputs": true,
928
928
"aggressive_truncation": true,
929
929
"auto_resume": true
@@ -933,8 +933,7 @@ OpenCode 에서 지원하는 모든 LSP 구성 및 커스텀 설정 (opencode.js
Copy file name to clipboardExpand all lines: README.md
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -692,7 +692,7 @@ When agents thrive, you thrive. But I want to help you directly too.
692
692
-**Empty Message Sanitizer**: Prevents API errors from empty chat messages by automatically sanitizing message content before sending.
693
693
-**Grep Output Truncator**: Grep can return mountains of text. This dynamically truncates output based on your remaining context window—keeps 50% headroom, caps at 50k tokens.
694
694
-**Tool Output Truncator**: Same idea, broader scope. Truncates output from Grep, Glob, LSP tools, and AST-grep. Prevents one verbose search from eating your entire context.
695
-
-**Preemptive Compaction**: Compacts session proactively before hitting hard token limits. Runs before you get into trouble.
695
+
-**Preemptive Compaction**: Compacts session proactively before hitting hard token limits. Runs at 85% context window usage. **Enabled by default.** Disable via `disabled_hooks: ["preemptive-compaction"]`.
696
696
-**Compaction Context Injector**: Preserves critical context (AGENTS.md, current directory info) during session compaction so you don't lose important state.
697
697
-**Thinking Block Validator**: Validates thinking blocks to ensure proper formatting and prevent API errors from malformed thinking content.
698
698
-**Claude Code Hooks**: Executes hooks from Claude Code's settings.json - this is the compatibility layer that runs PreToolUse/PostToolUse/UserPromptSubmit/Stop hooks.
@@ -910,7 +910,7 @@ Disable specific built-in hooks via `disabled_hooks` in `~/.config/opencode/oh-m
**Note on `auto-update-checker` and `startup-toast`**: The `startup-toast` hook is a sub-feature of `auto-update-checker`. To disable only the startup toast notification while keeping update checking enabled, add `"startup-toast"` to `disabled_hooks`. To disable all update checking features (including the toast), add `"auto-update-checker"` to `disabled_hooks`.
916
916
@@ -962,7 +962,7 @@ Opt-in experimental features that may change or be removed in future versions. U
962
962
```json
963
963
{
964
964
"experimental": {
965
-
"preemptive_compaction": true,
965
+
"preemptive_compaction_threshold": 0.85,
966
966
"truncate_all_tool_outputs": true,
967
967
"aggressive_truncation": true,
968
968
"auto_resume": true
@@ -972,8 +972,7 @@ Opt-in experimental features that may change or be removed in future versions. U
|`preemptive_compaction`|`false`| Compacts session proactively before hitting hard token limits. Runs at 80% context window usage by default. |
976
-
|`preemptive_compaction_threshold`|`0.80`| Threshold percentage (0.5-0.95) to trigger preemptive compaction. Only applies when `preemptive_compaction` is enabled. |
975
+
|`preemptive_compaction_threshold`|`0.85`| Threshold percentage (0.5-0.95) to trigger preemptive compaction. The `preemptive-compaction` hook is enabled by default; this option customizes the threshold. |
977
976
|`truncate_all_tool_outputs`|`false`| Truncates ALL tool outputs instead of just whitelisted tools (Grep, Glob, LSP, AST-grep). Tool output truncator is enabled by default - disable via `disabled_hooks`. |
978
977
|`aggressive_truncation`|`false`| When token limit is exceeded, aggressively truncates tool outputs to fit within limits. More aggressive than the default truncation behavior. Falls back to summarize/revert if insufficient. |
979
978
|`auto_resume`|`false`| Automatically resumes session after successful recovery from thinking block errors or thinking disabled violations. Extracts the last user message and continues. |
0 commit comments