480 Commits

Author SHA1 Message Date
Solaris-star
511c764f45 fix(agent): route finish_reason='length' with blank content to length recovery
When an LLM response arrives with finish_reason='length' and has_tool_calls
but blank text content (e.g. the model spent its whole output budget on a
tool call whose closing tag was truncated), the runner dropped the tool
calls and then misrouted the blank response into the empty-response retry
branch. Retrying the same prompt cannot recover from output-budget
exhaustion, so every retry hit the same length ceiling and the turn ended
in the generic apology.

The length-recovery branch was gated on 'finish_reason == length and not
is_blank_text(clean)', so a blank-but-truncated turn could never reach it.

- The empty-response retry branch now excludes finish_reason == 'length'
  (in addition to 'error').
- The length-recovery branch no longer requires non-blank content, so a
  blank-but-truncated turn enters recovery and appends
  build_length_recovery_message (which handles a blank tail safely).

Adds a regression test asserting the length-recovery path is taken; it
fails on the unfixed code and passes with the fix.

Fixes #5133
2026-07-30 19:55:19 +08:00
Xubin Ren
0eac82984c test(mcp): stabilize idle reconnect timing 2026-07-30 19:44:09 +08:00
yu-xin-c
9ec4420104 fix(agent): release idle session locks 2026-07-30 19:17:37 +08:00
KDB
e633f867e8 fix(session): tolerate invalid idle-compaction timestamps 2026-07-30 18:52:16 +08:00
chengyongru
e2563e2e74
refactor(cli): split commands into focused modules (#5175) 2026-07-30 15:01:35 +08:00
chengyongru
c33c188afb
fix(session): preserve history during idle compaction (#5167) 2026-07-30 10:45:45 +08:00
Xubin Ren
ba0ba4749d feat(webui): add skills marketplace 2026-07-30 01:13:37 +08:00
chengyongru
757ad9c764
refactor: enforce BasedPyright strict type checking (#5158) 2026-07-29 21:37:11 +08:00
chengyongru
e703481755
fix(memory): expose media references to session consolidation (#5157)
Co-authored-by: shakewingo <yaoyingshakewin@gmail.com>
Co-authored-by: bingqilinweimaotai <111987281+bingqilinweimaotai@users.noreply.github.com>
2026-07-29 15:18:44 +08:00
chengyongru
393d429e0a
fix(ci): stabilize and speed up CI (#5145) 2026-07-28 22:55:59 +08:00
chengyongru
0c6c0438d4
feat(config): add actionable startup diagnostics and WebUI recovery (#5110) 2026-07-28 18:52:05 +08:00
chengyongru
ae089aa3ae fix(webui): reconcile threads after browser resume 2026-07-28 16:25:08 +08:00
chengyongru
78cf68c291 fix(agent): snapshot active tasks before cancellation 2026-07-28 15:42:52 +08:00
chengyongru
fd17c1352a fix(sdk): harden host integration contracts 2026-07-28 15:30:28 +08:00
chengyongru
c050955ae3 feat(sdk): add host integration extension points 2026-07-28 15:30:28 +08:00
chengyongru
12f828ea3d
fix(agent): read document attachments on demand (#5122) 2026-07-28 13:33:06 +08:00
chengyongru
ef9e687f19
refactor(core): remove redundant runtime scaffolding (#5127) 2026-07-28 11:07:58 +08:00
chengyongru
f78ad59ed0
fix(memory): preserve Dream input integrity (#5114) 2026-07-27 21:37:13 +08:00
yu-xin-c
7fd28c9f06 fix(memory): preserve unprocessed dream history 2026-07-27 15:47:21 +08:00
chengyongru
c13df29457
feat(memory): restore Dream model preset override (#5107) 2026-07-27 14:43:25 +08:00
chengyongru
281b4b7f0b
chore: remove expired v0.3.1 compatibility shims (#5106) 2026-07-27 13:53:04 +08:00
chengyongru
39348dfafe refactor(agent): remove dead lifecycle scaffolding 2026-07-27 12:00:06 +08:00
Xubin Ren
b695a7e875 fix(cli): harden quick start OAuth handling 2026-07-27 02:51:04 +08:00
Xubin Ren
a4ec83fb0d fix(cli): scope Codex proxy env resolution 2026-07-27 02:51:04 +08:00
chengyongru
2a1f840ce2 fix(cli): support Codex OAuth in quick start 2026-07-27 02:51:04 +08:00
Xubin Ren
68717937e8 fix(agent): throttle idle scans by default 2026-07-27 02:15:48 +08:00
Andrew Khmylov
7aab7e8830 feat(agent): make idle compaction scan interval configurable
Before this change, idle compaction is triggered every 1 second
if the incoming message stream is idle.
When triggered, it enumerates all session files, loads and parses them,
and then checks their expiration.

This becomes too CPU-intensive, especially on low-power devices like Raspberry Pi.
It's unlikely that you actually need to compact every second over the long time.

This change adds a configurable throttling for idle-compaction.

Default behavior is unchanged.
2026-07-27 02:15:48 +08:00
Xubin Ren
b55b76d755 fix(streaming): preserve recovered segments across channels 2026-07-27 01:39:46 +08:00
chengyongru
e6baecafcd fix(agent): close length recovery lifecycle gaps 2026-07-27 01:39:46 +08:00
chengyongru
27a00c7a4f fix(webui): merge length recovery stream segments 2026-07-27 01:39:46 +08:00
chengyongru
1d2ed6e4d2 fix(agent): reset recovery chains across injections
Reset both the recovered segments and retry budget whenever injected input starts a new logical answer. Cover fatal tool-error boundaries and rename the prompt test module so pytest can collect the full suite.
2026-07-27 01:39:46 +08:00
chengyongru
b19039f9d0 fix(agent): preserve length-recovered output 2026-07-27 01:39:46 +08:00
Xubin Ren
5d8046deef test(heartbeat): cover ignored unified routes 2026-07-27 00:12:44 +08:00
yu-xin-c
a7a6c26eab fix(heartbeat): route unified sessions to last channel 2026-07-27 00:12:44 +08:00
Xubin Ren
ff379b91cf fix(agent): preserve merged runtime context markers 2026-07-26 23:46:54 +08:00
yu-xin-c
eb93060f95 fix(agent): preserve pending runtime context 2026-07-26 23:46:54 +08:00
santhreal
745757cc37 fix(memory): skip non-dict history.jsonl lines when reading 2026-07-26 17:45:51 +08:00
santhreal
259d8a018c fix(skills): tolerate null requires/bins/env in skill metadata 2026-07-26 17:44:41 +08:00
Xubin Ren
e260d9b31c fix(agent): apply execution policy to existing workspaces 2026-07-24 19:25:52 +08:00
Xubin Ren
51f11a8548 docs(agent): execute authorized tasks through verification 2026-07-24 19:25:52 +08:00
Xubin Ren
7e15c4c447 fix(agent): track inline subagent lifecycle 2026-07-24 19:13:51 +08:00
Xubin Ren
3a400e0207 feat(agent): support inline subagent consultation 2026-07-24 19:13:51 +08:00
chengyongru
9aab94c766 Revert "fix: preserve pending message runtime context"
This reverts commit cad368f58512b444a93aaede0c5741a3488c9d98.
2026-07-24 14:47:50 +08:00
hamb1y
cad368f585 fix: preserve pending message runtime context 2026-07-24 12:28:13 +08:00
flyzstu
8bcab8885e
test(agent): use python3 in ExecTool workspace scope tests (#5064)
* test(agent): use python3 in ExecTool workspace scope tests (fixes #5062)

* test(agent): use python on Windows and python3 on POSIX in ExecTool workspace scope tests (fixes #5062)

* test(agent): share Python command fixture

---------

Co-authored-by: chengyongru <chengyongru.ai@gmail.com>
2026-07-24 09:42:38 +08:00
chengyongru
aae259c790
feat(webui): simplify model preset settings (#5061) 2026-07-24 00:55:06 +08:00
KDB
274613f064 fix(session): tolerate files removed during listing 2026-07-23 23:53:56 +08:00
chengyongru
96eb965aae
feat(webui): show the actual fallback model (#5017) 2026-07-23 15:57:13 +08:00
chengyongru
15de6be0af fix(providers): fall back on authentication errors 2026-07-23 14:52:04 +08:00
chengyongru
9cf2fb19c2
feat(xai): surface hosted X Search activity (#5050) 2026-07-23 13:42:09 +08:00