chengyongru
8f6a5594fb
refactor(session): centralize state ownership in SQLite ( #5943 )
...
* fix(session): move persistence off event loop
* refactor(session): isolate async persistence boundary
* refactor(session): keep a single session manager
* refactor(session): use stateless async adapters
* fix(session): serialize local persistence without file-lock contention
* refactor(session): own async persistence and snapshot commits
* refactor(session): narrow persistence changes to async adapters
* refactor(session): remove redundant async forwarding helpers
* fix(command): offload compact session persistence
* fix(session): adapt idle compaction to current main
* fix(webui): offload session metadata persistence
* refactor(session): centralize state ownership in SQLite
* fix(session): skip storage for non-recoverable followups
* test(webui): honor the full gateway event deadline
* perf(session): persist incremental changes and reuse owner snapshots
* test(agent): allow durable worker shutdown in burst test
* fix(gateway): drain session storage on Windows console shutdown
* fix(session): enforce bounded ownership and lifecycle-safe persistence
* fix: reject unresolved home paths and stabilize platform tests
* fix(session): preserve request context compatibility and owner-backed tests
* docs: focus configuration guide on user-facing behavior
* fix(session): adapt goal admission to async ownership after rebase
* fix(session): integrate current gateway and subagent contracts
* fix(session): align rebased workspace admission and async tests
* fix(session): support compatible SQLite schema evolution
* test(agent): use session owner in workspace context regressions
* test: stabilize Windows lifecycle and browser checks
* refactor(session): remove premature JSONL file export
* ci: bound Windows full-suite worker concurrency
* chore: remove session state refactor notes
* fix(session): queue writes and retain worker connections
* perf(webui): read detached metadata for session and task lists
* perf(agent): bound prompt preparation and local token counting
* docs: remove internal session storage guide
* perf(session): skip archived transcripts during idle scans
* fix(session): coordinate turns and isolate legacy session data
Bind WebUI input generations to the execution session and serialize idle
and SDK compaction with turns. Keep turn drafts through preparation so the
latest channel route persists.
Move imported workspace JSONL and checkpoints to durable private backups
before gateway admission, resuming cleanup after interruptions. Remove
committed child sessions when task creation is cancelled.
Validation: focused Python and frontend regressions, Ruff, BasedPyright,
import boundaries, WebUI build, and isolated gateway/browser flows.
* fix(agent): keep cancellation hooks independent of prompt preparation
* fix(session): preserve admission, delivery, and migration contracts
* fix(agent): preserve cancellation settlement after rebase
* fix(session): preserve request attribution through async ownership
2026-10-16 17:28:47 +08:00
Xubin Ren
1d69f630d7
fix(agent): provide current workspace access before model requests
2026-10-11 17:06:39 +08:00
chengyongru
5be1e589f2
feat(providers): share Responses backend with Codex WebSocket continuation ( #6096 )
...
* feat(codex): continue sessions over Responses WebSocket
* fix(codex): retain API errors with repeated handshake headers
* test(codex): assert attachment paths before JSON escaping
* refactor(providers): share Responses transport and state backend
* fix(grok): update subscription client version
* docs: keep Codex configuration focused on user settings
2026-10-08 11:54:23 +08:00
Kail Tian
5825e15a6f
fix(agent): clear stale failure state when resuming runner iterations
2026-10-03 01:01:30 +08:00
chengyongru
99ba062a97
fix(tui): accept goal requests during active turns ( #5981 )
...
* fix(tui): accept goal requests during active turns
* fix(goal): reuse live input routing and remove busy guards
* test(goal): cover followup streams across iteration budgets
* refactor(goal): expand slash commands into hidden agent input
* fix(goal): keep generated input permission scoped to users
* refactor(agent): encapsulate goal input permission scope
* refactor(goal): preserve task text without prompt wrapper
* test(goal): consolidate coverage and exercise restart recovery
* test(goal): wait for recovery reply without task registry race
2026-09-30 13:08:13 +08:00
chengyongru
e68afef670
fix(agent): log mid-turn injected messages ( #5878 )
...
* fix(agent): log messages consumed by mid-turn injection
* fix(agent): log injected batches after appending to transcript
* fix(agent): narrow injection metadata dictionary types
* refactor(agent): keep injection logging preview inline
2026-09-23 14:58:26 +08:00
chengyongru
a0a99f24da
test(agent): consolidate session inbox coverage
2026-09-17 22:18:38 +08:00
chengyongru
b669c2036c
refactor(agent): unify session message admission
2026-09-17 22:18:38 +08:00
chengyongru
7208fb663f
fix(agent): preserve queued turn semantics and completion
2026-09-17 22:18:38 +08:00
chengyongru
b15a5e8cb4
test(agent): await session inbox admission
2026-09-17 22:18:38 +08:00
chengyongru
4e2173c9eb
fix(agent): serialize session inbox processing
2026-09-17 22:18:38 +08:00
chengyongru
56f7afcfe4
fix(agent): preserve per-session message order
2026-09-17 22:18:38 +08:00
chengyongru
73410e0217
fix: stream internal model calls with idle timeouts ( #5730 )
...
* fix: stream internal model calls with idle timeouts
* fix(providers): reject streams without terminal events
2026-09-11 13:06:43 +08:00
chengyongru
d81aa5a4ab
refactor(agent): let runner own context compaction ( #5568 )
...
* refactor(agent): consolidate accepted history under pressure
* fix(agent): align provider and session compaction
* refactor(agent): simplify runner context compaction
* refactor(agent): remove background token consolidation
* fix(agent): keep injected transcript messages distinct
* refactor(agent): unify native compaction summaries
* fix(agent): preserve native compaction boundary
* fix(agent): unify context compaction paths
* fix(agent): preserve exact compaction request boundaries
2026-09-02 18:05:54 +08:00
chengyongru
6cd7063682
refactor(agent): defer transcript assembly to runner ( #5608 )
...
* refactor(agent): defer transcript assembly to runner
Keep persisted history and the fresh turn as explicit inputs until the Runner assembles the provider transcript. Preserve ContextBuilder and direct AgentRunner compatibility while making the save boundary structural.
Refs NAN-81.
* fix(providers): preserve mixed adjacent user content
2026-08-31 00:06:15 +08:00
chengyongru
a618e80887
refactor(agent): reduce loop runner parameter plumbing
2026-08-26 17:50:52 +08:00
chengyongru
4f6c0aedfa
refactor(agent): make run usage explicit ( #5546 )
...
* refactor(agent): make run usage explicit
* fix(api): capture usage per run
2026-08-26 15:18:53 +08:00
chengyongru
66d9328a00
fix(agent): defer subagent wait until turn exit
2026-08-25 17:56:16 +08:00
chengyongru
8332c604da
fix(agent): let subagents recover from tool errors
2026-08-25 11:54:40 +08:00
chengyongru
9895c23cb5
refactor(providers): define typed usage contract
2026-08-25 01:04:25 +08:00
Xubin Ren
c7e2a474a0
fix(runtime): normalize recovery session routing
2026-08-24 00:58:04 +08:00
Xubin Ren
12029f8812
feat(runtime): add user-controlled turn recovery
2026-08-24 00:58:04 +08:00
chengyongru
113e8d67ad
refactor: remove verified dead code
2026-08-08 21:10:34 +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
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
chengyongru
9aab94c766
Revert "fix: preserve pending message runtime context"
...
This reverts commit cad368f585 .
2026-07-24 14:47:50 +08:00
hamb1y
cad368f585
fix: preserve pending message runtime context
2026-07-24 12:28:13 +08:00
chengyongru
66690fdb0c
fix(webui): deliver late subagent results as new turns ( #4992 )
2026-07-22 23:04:36 +08:00
KDB
8981995474
fix(exec): clean up sessions on shutdown
2026-07-21 13:48:51 +08:00
chengyongru
198fd9f869
refactor(agent): capture runtime at turn admission
2026-07-10 17:54:34 +08:00
chengyongru
b4f069800e
refactor(agent): make runner consume required runtime
2026-07-10 17:54:34 +08:00
chengyongru
5af22042ec
fix(trigger): keep local worker alive on turn cancel
2026-07-03 00:36:29 +08:00
chengyongru
34535b4e7c
fix(webui): hide subagent backfill payloads
2026-07-02 14:36:23 +08:00
chengyongru
f32007c83f
fix(trigger): defer local triggers until session idle
2026-07-02 13:32:46 +08:00
Stellar鱼
a54e56c69e
fix(runner): ignore empty injected payloads ( #4337 )
2026-06-15 15:13:03 +08:00
chengyongru
a50b3ac0f2
fix: harden cron session automation flows
2026-06-12 18:13:25 +08:00
chengyongru
271b3651d7
refactor: use cron turn naming internally
2026-06-12 11:57:35 +08:00
chengyongru
d9d481bc15
refactor: centralize cron session metadata keys
2026-06-12 11:43:23 +08:00
chengyongru
a326ba40f4
feat(cron): bind scheduled automations to sessions
2026-06-11 19:48:07 +08:00
chengyongru
24e56fcf07
test: improve deterministic unit test coverage
2026-06-04 19:41:32 +08:00
chengyongru
84428136e6
test: harden timing-fragile test and add cross-tool ContextVar isolation test
...
Replace asyncio.sleep(0.05) with an asyncio.Event + patched Lock.acquire
to guarantee the waiting task has reached the lock before asserting. Add
a test confirming LongTaskTool and CompleteGoalTool ContextVars are
isolated, and document the design intent in _GoalToolsMixin.
2026-05-28 22:54:46 +08:00
hamb1y
0df60416ba
fix(agent): address session and streaming concurrency bugs
2026-05-28 22:54:46 +08:00
chengyongru
99cc6ee808
test(agent): expand coverage and refactor test structure
...
- Add 42 tests for ContextBuilder (context.py: 0→42 tests)
- Add 37 tests for SubagentManager lifecycle (subagent.py: 2→37 tests)
- Add 42 unit tests for AutoCompact in isolation
- Split monolithic test_runner.py (3313 lines) into 9 focused files:
test_runner_core, test_runner_hooks, test_runner_errors,
test_runner_safety, test_runner_persistence, test_runner_governance,
test_runner_tool_execution, test_runner_injections,
test_loop_runner_integration
- Add 3 config passthrough tests (temperature/max_tokens/reasoning_effort)
- Fix fragile patch.object(__init__) in test_stop_preserves_context
- Create shared conftest.py with make_provider/make_loop factories
Total: 934 tests passing, 0 regressions
2026-05-13 12:49:17 +08:00