🤖 refactor: track the agent-loop host services refactor (phases 1 to 5)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
- Domain
- backend
Research direction
This issue tracks phases 1–5 of moving agent-loop host calls behind Effect services; phase results are posted in comments, and related work is listed by issue number. Start by reading the phase plans and linked issues, especially the in-progress Phase 2 work around SessionFiles and HistoryService. Done means all five phases are complete, one full agent turn runs on test layers, and the planned checks pass.
Written by the indexing model from the issue text.
Description
Summary
Five phases put the agent loop's host calls behind Effect services. Each service has a Node layer for the app and a test layer for tests. At the end, one full agent turn runs on test layers, and the local/no-host-imports lint rule keeps host imports out of the agent-loop files.
This issue tracks the phases. Each phase posts its end results as a comment here.
Phases
| Phase | What it adds | State |
|---|---|---|
| 1 | Guardrails: the loop-test baseline (make test-loop-baseline), the paired loop-test tripwire, and the local/no-host-imports rule with a frozen allow map |
Done: #7199, #7200, #7201, #7206, #7207; follow-ups #7264, #7265 |
| 2 | SessionFiles: the session files below HistoryService, with a memory layer |
In progress |
| 3 | HostClock: the clock and timers of the loop |
In progress |
| 4 | SessionLocks: the session-dir locks and leases |
In progress |
| 5 | Host I/O services (HostFiles, HostPaths, HostProcesses, DesktopNotifications, RuntimeFactory) and one agent turn on test layers |
In progress |
The phases keep the chat.jsonl format, so upgrade and downgrade stay safe. PRs move code and keep behavior. Each phase ends on checks that its plan fixed in advance.
Related issues
- Defects found while planning: #7203, #7204, #7205, #7209, #7210
- Phase 1 review findings deferred to later: #7208 (fixed by #7264 and #7265), #7299 (2 signal edge cases)
- Loop test files that fail on unchanged main: #7256
- CI flakes that took refactor PRs out of the merge queue: #7293
make testfailures that main had before phase 1: #7297Codex Commentsblocks on a clean security receipt without a Reviewed commit line: #7302- Phase 3 review findings deferred to later (mixed clocks under a test HostClock): #7282
- Module groups that phase 5 leaves for later: #7238, #7239, #7240, #7241, #7242, #7243, #7244, #7245
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: max • Cost: $99.39
- Dominant language
- TypeScript
- Stars
- 2.1k
- Forks
- 140
- Avg merge
- 4h 57m
- Merged PRs (30d)
- 946
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from coder/xum
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
🤖 fix: a Daytona connection test started before a settings save can show the old key as connectedOpen
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
MoonshotAI/kimi-code#4398 ·
Maintainers usually reply within 1 day
-
Xiaomi Mimo语音识别服务异常Openpending triage
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
package-lock.json : les binaires natifs macOS et Linux de unrs-resolver ont disparu depuis #1823Openbug dependencies
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
AxaFrance/design-system#2064 ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100