github / github/copilot-cli

/remote toggle stops working in long-running sessions; off/on cycle does not recover

Aberta
#3,358 1 comentário 2 reações 0 responsáveis Ver no GitHub
area:networking area:sessions
Linguagem predominante
Shell
Estrelas
11.2k
Forks
1.9k
Merge médio
14h 16min
PRs com merge (30d)
6

Descrição

## Summary

`/remote on` appears to stop working partway through a long-running Copilot CLI session. Toggling `/remote off` then `/remote on` did not restore the connection — the GitHub mobile app continued to show the session as "off / not remote-enabled". The only working remediation was to abandon the session entirely and start a fresh one.

## Environment

- **Copilot CLI version:** 1.0.49-1
- **Platform:** macOS (Darwin)
- **Model in session:** `claude-opus-4.7-1m-internal`
- **Session length when issue surfaced:** very long (multi-day session with overnight scheduled prompts via `/schedule`)

## Steps to reproduce

1. Start a Copilot CLI session and enable `/remote on`.
2. Confirm the session shows as remote-enabled in the GitHub mobile app.
3. Let the session run for an extended period (in our case: multi-day, with `manage_schedule` background heartbeats firing every 30 min overnight).
4. Return to the GitHub mobile app and try to interact remotely.

## Expected

The session continues to appear as remote-enabled and accepts remote input from the GitHub mobile/web app.

## Actual

- The GitHub mobile app shows the session as "off" / not remote-controllable, even though `/remote` inside the CLI reports it as on.
- Toggling `/remote off` then `/remote on` from inside the CLI does **not** restore the link.
- No error message is shown on either side.
- Only workaround: end the session and start a new one, then `/remote on` from the fresh session.

## Impact

The whole point of `/remote` is to check in on long-running, possibly overnight work from a phone. Losing the link silently during exactly the kind of long sessions it's designed for defeats the feature. Starting over also loses in-memory session state (scheduled prompts via `manage_schedule` are session-scoped and end with the session — this compounds the cost of having to start over).

## Suggested investigation

- Is there a server-side heartbeat / WS keepalive that's timing out for long-idle sessions?
- Does `/remote on` re-register with the GitHub app side, or does it only flip a local flag?
- Is there a way to surface the broken link in the CLI so users don't think it's still working?

Happy to share more context (anonymized session ID, approximate timing) if useful.

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Comece com o comando `/remote` e o comportamento de heartbeat em segundo plano de `manage_schedule` descrito na issue. Reproduza uma sessão de vários dias, compare o estado relatado pela CLI com o aplicativo móvel do GitHub e verifique se o registro remoto ou o estado de keepalive sobrevive ao longo período de inatividade. Está concluído quando o link remoto continua utilizável ou quando a CLI relata claramente que o link foi interrompido e se recupera disso.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
shell
Domínio
cli, networking
Tipo de issue
Bug
Dificuldade
4/5
Tempo estimado
3-5 dias
Status de atividade
Pouca atividade
Clareza
Razoavelmente clara
Facilidade para iniciantes
42/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.