FLEET: resumeSession() with customAgents errors with malformed timeout message "[object Object]ms"
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- javascript, typescript
Direzione di ricerca
Inizia da TypeScript ResumeSessionConfig e dal punto di ingresso resumeSession(sessionId, ...), quindi confronta la gestione di customAgents con createSession. Segui il percorso session.resume e la formattazione dell’errore di timeout. Il lavoro è completato quando il comportamento di customAgents durante la ripresa è supportato o rifiutato esplicitamente, e i messaggi di timeout mostrano un valore numerico invece di [object Object].
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
Calling client.resumeSession(sessionId, { customAgents: [...] }) on a live session produces a timeout error with a malformed message: "Timeout after [object Object]ms". This reveals two bugs: (1) resumeSession with customAgents fails, and (2) the timeout value is being stringified via implicit .toString() instead of extracting the numeric value.
Steps to Reproduce
import { CopilotClient, approveAll } from '@github/copilot-sdk';
const client = new CopilotClient();
await client.start();
const session = await client.createSession({ onPermissionRequest: approveAll });
const sessionId = session.id;
await session.destroy();
try {
const resumed = await client.resumeSession(sessionId, {
onPermissionRequest: approveAll,
customAgents: [{
name: 'post-creation-agent',
displayName: 'Post Creation Agent',
description: 'Added during resume',
prompt: 'You are a post-creation agent.',
tools: ['view'],
infer: false,
}],
});
} catch (err) {
console.error(err.message);
// → "Timeout after [object Object]ms waiting for session.idle"
}
Observed Behaviour
Spike data (2026-03-17):
{
"resumeSucceeded": false,
"resumeError": "Timeout after [object Object]ms waiting for session.idle",
"answer": "NO/ERROR"
}
Bug 1: resumeSession with customAgents fails
The TypeScript type ResumeSessionConfig accepts customAgents, but the CLI backend appears to reject or ignore it and the session never reaches idle. Either:
customAgentsis not supported on resume (the type should exclude it), or- There is a backend defect handling
customAgentsinsession.resume
Bug 2: Malformed timeout error message
"Timeout after [object Object]ms" is a string formatting bug. The timeout config value (likely { ms: number } or similar) is being coerced to string via .toString() instead of extracting the numeric value.
Expected: "Timeout after 30000ms waiting for session.idle"
Workaround
Only set customAgents at initial createSession time. Do not attempt to add agents via resumeSession:
// ✅ Works
const session = await client.createSession({
onPermissionRequest: approveAll,
customAgents: [{ name: 'my-agent', ... }],
});
// ❌ Errors with malformed timeout
const session = await client.resumeSession(id, {
customAgents: [{ name: 'my-agent', ... }],
});
Environment
- SDK:
@github/copilot-sdkv0.1.32 - CLI: latest
- Node: v24.13.1
- Lingua principale
- Java
- Stelle
- 10.5k
- Fork
- 1.5k
- Merge medio
- 1g 9h
- PR unite (30g)
- 131
Guida per i contributori
Apri 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 github/copilot-sdk
-
agentic-workflows
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
github/copilot-sdk#2709 · 1 commento ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
github/copilot-sdk#2673 ·
-
bug testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
github/copilot-sdk#2628 ·
-
agentic-workflows
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
github/copilot-sdk#2627 · 1 commento ·
-
agentic-workflows
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
github/copilot-sdk#2493 ·
Tutte le issue di github/copilot-sdk
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
elastic/gradle-plugins#157 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
cryptomator/hub#497 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
johanhaleby/occurrent#1120 ·