Setting to restore tasks at launch without resuming their agents
I maintainer di solito rispondono entro 4 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- tooling
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- TypeScript
- Stelle
- 1k
- Fork
- 144
- Merge medio
- 4g 19h
- PR unite (30g)
- 28
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di johannesjo/parallel-code
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
johannesjo/parallel-code#385 ·
I maintainer di solito rispondono entro 4 giorni
-
Option to show usage as used instead of left, and potential further customization ideasForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
johannesjo/parallel-code#353 ·
I maintainer di solito rispondono entro 4 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
johannesjo/parallel-code#163 · 2 commenti ·
I maintainer di solito rispondono entro 4 giorni
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 12/100
johannesjo/parallel-code#375 · 2 commenti ·
I maintainer di solito rispondono entro 4 giorni
-
Package as a PlatpakApertaenhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
johannesjo/parallel-code#374 ·
I maintainer di solito rispondono entro 4 giorni
Tutte le issue di johannesjo/parallel-code
Issue simili
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
ci
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
ClickHouse/clickhouse-js#1248 ·
I maintainer di solito rispondono entro 1 giorno
-
E2E: Darlehen-Test wartet auf die gebuchte Auszahlung, bevor er zur Liquiditätsvorschau wechseltApertatechnik
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
SR5-FoundryVTT/SR5-FoundryVTT#2162 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
AhmedNAgy25/analysor#25 ·
I maintainer di solito rispondono entro 1 giorno