2102 Commits

Author SHA1 Message Date
mac26ai
4f2c57eb4e feat(skills): compact skill paths with ~ to reduce prompt tokens
Replace absolute home directory prefix with ~ in skill <location> tags
injected into the system prompt. Models understand ~ expansion and the
read tool resolves it, so this is a safe, backward-compatible change.

Saves ~5-6 tokens per skill path. For a workspace with 90+ skills,
this reduces system prompt size by ~400-600 tokens.

Changes:
- Add compactSkillPaths() helper in workspace.ts
- Apply in buildWorkspaceSkillSnapshot and buildWorkspaceSkillsPrompt
- Add test for path compaction behavior

Before: /Users/alice/.bun/install/global/node_modules/openclaw/skills/github/SKILL.md
After:  ~/.bun/install/global/node_modules/openclaw/skills/github/SKILL.md
2026-02-18 01:35:37 +01:00
Peter Steinberger
2e91552f09
feat(agents): add generic provider api key rotation (#19587) 2026-02-18 01:31:11 +01:00
Peter Steinberger
b05e89e5e6 fix(agents): make image sanitization dimension configurable 2026-02-18 00:54:20 +01:00
Han Xiao
5ee79f80eb fix: reduce default image dimension from 2000px to 1200px
Large images (2000px) consume excessive context tokens when sent to LLMs.
1200px provides sufficient detail for most use cases while significantly
reducing token usage.

The 5MB byte limit remains unchanged as JPEG compression at 1200px
naturally produces smaller files.

(cherry picked from commit 40182123dd2673b4b65e6846fa066380f10b781f)
2026-02-18 00:52:52 +01:00
Tyler Yust
b2acfd606a fix(subagent): update SUBAGENT_SPAWN_ACCEPTED_NOTE for clarity on auto-announcement behavior 2026-02-17 15:49:22 -08:00
Tyler Yust
087dca8fa9
fix(subagent): harden read-tool overflow guards and sticky reply threading (#19508)
* fix(gateway): avoid premature agent.wait completion on transient errors

* fix(agent): preemptively guard tool results against context overflow

* fix: harden tool-result context guard and add message_id metadata

* fix: use importOriginal in session-key mock to include DEFAULT_ACCOUNT_ID

The run.skill-filter test was mocking ../../routing/session-key.js with only
buildAgentMainSessionKey and normalizeAgentId, but the module also exports
DEFAULT_ACCOUNT_ID which is required transitively by src/web/auth-store.ts.

Switch to importOriginal pattern so all real exports are preserved alongside
the mocked functions.

* pi-runner: guard accumulated tool-result overflow in transformContext

* PI runner: compact overflowing tool-result context

* Subagent: harden tool-result context recovery

* Enhance tool-result context handling by adding support for legacy tool outputs and improving character estimation for message truncation. This includes a new function to create legacy tool results and updates to existing functions to better manage context overflow scenarios.

* Enhance iMessage handling by adding reply tag support in send functions and tests. This includes modifications to prepend or rewrite reply tags based on provided replyToId, ensuring proper message formatting for replies.

* Enhance message delivery across multiple channels by implementing sticky reply context for chunked messages. This includes preserving reply references in Discord, Telegram, and iMessage, ensuring that follow-up messages maintain their intended reply targets. Additionally, improve handling of reply tags in system prompts and tests to support consistent reply behavior.

* Enhance read tool functionality by implementing auto-paging across chunks when no explicit limit is provided, scaling output budget based on model context window. Additionally, add tests for adaptive reading behavior and capped continuation guidance for large outputs. Update related functions to support these features.

* Refine tool-result context management by stripping oversized read-tool details payloads during compaction, ensuring repeated read calls do not bypass context limits. Introduce new utility functions for handling truncation content and enhance character estimation for tool results. Add tests to validate the removal of excessive details in context overflow scenarios.

* Refine message delivery logic in Matrix and Telegram by introducing a flag to track if a text chunk was sent. This ensures that replies are only marked as delivered when a text chunk has been successfully sent, improving the accuracy of reply handling in both channels.

* fix: tighten reply threading coverage and prep fixes (#19508) (thanks @tyler6204)
2026-02-17 15:32:52 -08:00
Peter Steinberger
ae2c8f2cf0 feat(models): support anthropic sonnet 4.6 2026-02-18 00:00:31 +01:00
Tyler Yust
75001a0490 fix cron announce routing and timeout handling 2026-02-17 11:40:04 -08:00
Tyler Yust
2362aac3db chore: document sessions_spawn response note and subagent context prefix 2026-02-17 11:05:37 -08:00
Seb Slight
9f261f592d
revert: PR 18288 accidental merge (#19224)
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 3cda31578ccf71365d5815a8374922e835efff0e
Co-authored-by: sebslight <19554889+sebslight@users.noreply.github.com>
Co-authored-by: sebslight <19554889+sebslight@users.noreply.github.com>
Reviewed-by: @sebslight
2026-02-17 10:05:29 -05:00
Seb Slight
4536a6e05f
revert(agents): revert base64 image validation (#19221) 2026-02-17 09:58:39 -05:00
Seb Slight
f44e3b2a34
revert: fix models set catalog validation (#19194)
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 7e3b2ff7afe052097c4414fc64d7e66191e8fcc3
Co-authored-by: sebslight <19554889+sebslight@users.noreply.github.com>
Co-authored-by: sebslight <19554889+sebslight@users.noreply.github.com>
Reviewed-by: @sebslight
2026-02-17 09:43:41 -05:00
Shakker
2547b782d7
Agents: add before_message_write persistence regression tests 2026-02-17 14:29:41 +00:00
Seb Slight
3211280bed
revert: per-model thinkingDefault override (#19195)
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: fe2c59e222a71086864f8abfae05d2da03ad4066
Co-authored-by: sebslight <19554889+sebslight@users.noreply.github.com>
Co-authored-by: sebslight <19554889+sebslight@users.noreply.github.com>
Reviewed-by: @sebslight
2026-02-17 09:25:18 -05:00
Sebastian
5d1bcc76cc docs(zai): document tool_stream defaults 2026-02-17 09:22:55 -05:00
Seb Slight
d54e4af4a1
revert(agents): remove llms.txt discovery prompt (#19192) 2026-02-17 09:15:01 -05:00
Sebastian
cc359d338e test: add fetch mock helper and reaction coverage 2026-02-17 09:02:39 -05:00
Sebastian
210bc37971 chore(subagents): add regression coverage and changelog 2026-02-17 08:40:36 -05:00
Ayaan Zaidi
900b97e3c7 test: type telegram action mock passthrough args 2026-02-17 13:30:29 +05:30
Ayaan Zaidi
7be63ec74a fix: align tool execute arg parsing for hooks 2026-02-17 13:30:29 +05:30
Ayaan Zaidi
f8b9e26c47 test: pass extensionContext in abort dedupe e2e 2026-02-17 13:30:29 +05:30
Nimrod Gutman
92de4031a3 Revert "fix(telegram): wire sendPollTelegram into channel action handler (#16977)"
This reverts commit 7bb9a7dcfc3194a953f0ca20f86f9caba8a22923.
2026-02-17 09:45:08 +02:00
Nimrod Gutman
33b59441d2 Revert "Fix Telegram poll action wiring"
This reverts commit 556b531a140330540a10299cd6c4907750a2c0b6.
2026-02-17 09:43:57 +02:00
Nimrod Gutman
b2fef5ebc4 Revert "Default Telegram polls to public"
This reverts commit c43e95e011cdbdd3be9446b12d257899b4a90201.
2026-02-17 09:38:15 +02:00
Sascha Reuter
60dc3741c0
fix: before_tool_call hook double-fires with abort signal (#16852)
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 6269d617f3ac811e03cd29d915f94657da922ba1
Co-authored-by: sreuter <550246+sreuter@users.noreply.github.com>
Co-authored-by: obviyus <22031114+obviyus@users.noreply.github.com>
Reviewed-by: @obviyus
2026-02-17 12:53:54 +05:30
cpojer
52ad28e097
chore: Fix types in tests 44/N. 2026-02-17 15:50:07 +09:00
cpojer
688f86bf28
chore: Fix types in tests 43/N. 2026-02-17 15:50:07 +09:00
cpojer
2e375a5498
chore: Fix types in tests 32/N. 2026-02-17 14:33:38 +09:00
cpojer
116f5afea3
chore: Fix types in tests 31/N. 2026-02-17 14:33:26 +09:00
cpojer
4235435309
chore: Fix types in tests 26/N. 2026-02-17 14:31:40 +09:00
cpojer
d0cb8c19b2
chore: wtf. 2026-02-17 13:36:48 +09:00
Sebastian
ed11e93cf2 chore(format) 2026-02-16 23:20:16 -05:00
Sebastian
f8adfcf60e test(agents): cover exec non-zero exits 2026-02-16 23:12:06 -05:00
Sebastian
67014228cf fix(subagents): harden announce retry guards 2026-02-16 22:57:15 -05:00
cpojer
cf6cdc74d0
chore: Fix types in tests 23/N. 2026-02-17 12:24:03 +09:00
cpojer
18cc48dfd9
chore: Fix types in tests 20/N. 2026-02-17 12:23:12 +09:00
cpojer
e09643e82c
chore: chore: Fix types in tests 19/N. 2026-02-17 12:23:12 +09:00
Sebastian
ecfc5a5ee7 test(agents): cover tool result media placeholders 2026-02-16 22:21:00 -05:00
Sebastian
7a00f056af revert(sandbox): revert SHA-1 slug restoration 2026-02-16 22:03:41 -05:00
cpojer
6b8c0bc697
chore: Format files. 2026-02-17 12:00:38 +09:00
cpojer
db3529e924
chore: Fix types in tests 14/N. 2026-02-17 12:00:29 +09:00
Sebastian
6070116382 revert(exec): undo accidental merge of PR #18521 2026-02-16 21:47:18 -05:00
cpojer
9c5f08244e
chore: Format files. 2026-02-17 11:37:11 +09:00
Sebastian
391796a3fb fix(agents): restore multi-image image tool schema contract 2026-02-16 21:34:27 -05:00
Peter Steinberger
0c1c34c950 refactor(plugins): split before-agent hooks by model and prompt phases 2026-02-17 03:28:20 +01:00
Peter Steinberger
a75e95be02 fix(reply): track messaging media aliases for dedupe 2026-02-17 03:27:23 +01:00
cpojer
ac38d51290
chore: Fix types in tests 7/N. 2026-02-17 11:22:49 +09:00
Peter Steinberger
901d4cb310 revert: accidental merge of OC-09 sandbox env sanitization change 2026-02-17 03:19:42 +01:00
Sebastian
bb8df6ab8d revert(tools): finish rollback of PR #18584 2026-02-16 21:13:48 -05:00
Sebastian
f924ab40d8 revert(tools): undo accidental merge of PR #18584 2026-02-16 21:13:48 -05:00