Setting to restore tasks at launch without resuming their agents
Maintainer thường phản hồi trong vòng 4 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- tooling
Hướng nghiên cứu
Start by reading src/store/persistence.ts and TaskAITerminal.tsx to trace how restored agents are started, then locate the store, settings, and IPC patterns for the proposed setting and live-PTY check. Add the Behavior checkbox and suspended restore path, and cover the setting-off/on cases, live-PTY reattach, persistence round trip, and Resume behavior with tests. Done means launch respects the setting while Resume and reattachment retain their described behavior.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
When Parallel Code starts, it resumes the agents of every open task. loadState creates each persisted agent with resumed: true and status: 'running', and mounting its terminal starts the agent with its resume args: claude --resume <id> or codex resume <id> when the session id is known, and otherwise the agent's resume args, such as claude --continue or codex resume --last. They all start at once.
With a dozen tasks open, a dozen agents re-enter their conversations as soon as the app opens, including the ones I'm not about to work on. The cost we noticed was with Claude Code: sessions close to their context limit compacted right after launch, several at the same time. Most of the time I open the app to work on one task. Collapsing a task keeps its agent stopped, but it also takes the task out of the layout.
Proposal
A setting under Behavior: Resume agent sessions on launch.
When it's off, restored agents are not started. Each shows "Session suspended" with the existing Resume and Restart controls, and Resume continues the conversation the same way launch does today. An agent whose process is still running (after a renderer reload, for example) reattaches as it does now, since that spawns nothing.
I'd default it to on, so nothing changes for existing users. We run it off in our fork, but that's our preference.
What a PR would contain
We've used this in our fork (miadisabelle/mia-parallel-code) since July, and it is merged onto 3.1.0. About 150 lines:
src/store/persistence.ts: unless the setting is on or the agent's PTY is still alive, a restored agent is created suspended (status: 'exited',signal: 'suspended') and is left out of the spawn path.- A
ListRunningAgentIdsIPC channel, so the restore can tell a live PTY from one that needs a new process before anything mounts. TaskAITerminal.tsx: a suspended agent mounts neither its terminal nor its chat view, since mounting either starts it. The exit badge reads "Session suspended".restartAgentandswitchAgentclear the flag. The setting itself lives in the store, persistence and autosave, with a checkbox in Settings.- Tests: suspended when the setting is off, resumed when it's on, live-PTY reattach, the setting's round trip, and Resume clearing the flag.
Would you take a PR for this? If you'd rather solve it another way, I'll follow that.
🤖 Generated with Claude Code
- Ngôn ngữ chính
- TypeScript
- Star
- 1k
- Fork
- 144
- Merge trung bình
- 4 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 28
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của johannesjo/parallel-code
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
johannesjo/parallel-code#385 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Option to show usage as used instead of left, and potential further customization ideasCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
johannesjo/parallel-code#353 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
johannesjo/parallel-code#163 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 4 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 12/100
johannesjo/parallel-code#375 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Package as a PlatpakĐang mởenhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
johannesjo/parallel-code#374 ·
Maintainer thường phản hồi trong vòng 4 ngày
Tất cả issue của johannesjo/parallel-code
Issue tương tự
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
ci
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
ClickHouse/clickhouse-js#1248 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
E2E: Darlehen-Test wartet auf die gebuchte Auszahlung, bevor er zur Liquiditätsvorschau wechseltĐang mởtechnik
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
SR5-FoundryVTT/SR5-FoundryVTT#2162 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
AhmedNAgy25/analysor#25 ·
Maintainer thường phản hồi trong vòng 1 ngày