github / github/copilot-cli

Feature: allow /compact to be invoked by the agent (programmatic compaction)

Abierto
#3,916 0 comentarios 0 reacciones 0 asignados Ver en GitHub
area:agents area:context-memory
Lenguaje dominante
Shell
Estrellas
11.2k
Forks
1.9k
Merge medio
14 h 16 min
PR fusionados (30 d)
6

Descripción

## Summary
`/compact` is currently a user-only slash command. The agent itself should be able to invoke compaction when it detects it's running short on context or when a long task naturally hits a phase boundary.

## Use cases
- Multi-phase workflows (e.g. plan → implement → review pipelines) where the agent knows when a phase is complete and the prior context can be safely summarized.
- Long-running autonomous sessions where the user isn't present to trigger `/compact` manually.
- Skill / plugin authors who want to script a compaction step at a known-safe boundary.

## Proposal
Expose `/compact` as a callable tool (e.g. `compact_context`) so the agent can invoke it programmatically, with the same effect as the user typing the slash command. Permission-gate it the same way other state-changing tools are gated.

## Out of scope
Auto-compaction policy (when to fire, what to summarize) is separate; this issue is only about exposing the existing capability to the agent.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza localizando el comando /compact existente y las rutas de registro y control de permisos para las herramientas que cambian el estado. Verifica cómo la herramienta invocable puede producir el mismo efecto que el comando del usuario y, después, revisa las pruebas relevantes de CLI o los patrones de prueba. Se considera terminado cuando el agente puede invocar la compactación con el mismo control de permisos, sin añadir una política de compactación automática.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
shell
Área
cli, tooling
Tipo de issue
Nueva funcionalidad
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Tranquilo
Claridad
Bastante claro
Aptitud para principiantes
55/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.