Launcher override: honour LIFEOS_CLAUDE_LAUNCH so the launch can route through wrappers like ollama launch claude

Abierto Apto para principiantes
#3,001 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 5 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
76/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
bun, typescript
Área
backend, cli

Línea de trabajo

Empieza en LifeOS/install/LIFEOS/TOOLS/lifeos.ts, en la línea 552, dentro de cmdLaunch, y sigue cómo construye y ejecuta los argumentos del comando. Comprueba cómo el lanzador gestiona LIFEOS_CLAUDE_LAUNCH y conserva las opciones de LifeOS después del separador de argumentos de un wrapper. Reproduce el problema con el comando bun proporcionado; se considera resuelto cuando el wrapper recibe los argumentos añadidos y, si la variable no está definida, se sigue iniciando claude.

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

Descripción

Version

LifeOS 8.761.0 · attestation: 7 system file(s) differ from danielmiessler/[email protected]:

  • skills\LifeOS\SKILL.md
  • skills\LifeOS\Tools\DeployComponents.ts
  • skills\LifeOS\Tools\InstallEngine.ts
  • LIFEOS\TOOLS\Doctor.ts
  • LIFEOS\TOOLS\lifeos.ts
  • LIFEOS\TOOLS\Services.ts
  • LIFEOS\STATUSLINE\Admission.ts
What is broken

cmdLaunch spawns the literal binary claude with no way to route the launch through a wrapper. Users who launch Claude Code through a launcher integration — for example Ollama 0.40's ollama launch claude, which proxies the session to its own model stack and requires extra CLI arguments after a bare -- — cannot launch LifeOS at all: either the wrapper is bypassed (LifeOS silently launches plain claude, losing the wrapper's model routing) or the wrapper parses the LifeOS constitution flags itself and fails with Error: unknown flag: --append-system-prompt-file. The spawned binary is hardcoded, so there is no seam for any wrapper: proxy shims, model routers, and vendor-launcher integrations are all locked out.

Where (file:line)

LifeOS/install/LIFEOS/TOOLS/lifeos.ts:552 (cmdLaunch)

Repro on a clean tree
Clone https://github.com/danielmiessler/LifeOS to any directory. On the unpatched tree, from inside that clone run, via a POSIX shell with bun on PATH:

    LIFEOS_CLAUDE_LAUNCH='cmd /c echo' bun '<clone>/LifeOS/install/LIFEOS/TOOLS/lifeos.ts' -s '<clone>/LifeOS/install/LIFEOS/LIFEOS_SYSTEM_PROMPT.md' -- --version

The value of LIFEOS_CLAUDE_LAUNCH is ignored: the launcher prints its banner and then spawns `claude` directly, so the output ends with Claude Code's own version banner (`2.1.302 (Claude Code)`). With the patched launcher, the same command honours the prefix and the output ends with the prefix receiving the appended arguments verbatim (`--append-system-prompt-file .../LIFEOS_SYSTEM_PROMPT.md --version`).
Negative control

Probe: LIFEOS_CLAUDE_LAUNCH='cmd /c echo' bun 'C:~/DevSwarmProjects/LifeOS-upstream/LifeOS/install/LIFEOS/TOOLS/lifeos.ts' -s 'C:~/DevSwarmProjects/LifeOS-upstream/LifeOS/install/LIFEOS/LIFEOS_SYSTEM_PROMPT.md' -- --version · exit 0 · captured 2026-11-28T02:19:02.319Z

Red looks like: 2.1.302 (Claude Code)


                      LifeOS | Your Life Operating System

                      "Magnifying human capabilities..."

                            █████   │  
                            █████   │  "LifeOS here, ready to go..."
                            █████   │  ────────────────────────
                            █████   │  ⬢  LifeOS    8.761.0
                       ██████████   │  ⚙  Algo      8.45.0
                       ██████████   │  ✦  SK        7
                  ███████████████   │  ↪  HOOKS     36
                  ███████████████   │  ────────────────────────
             ████████████████████   │  
             ████████████████████   │  

                      → github.com/danielmiessler/LifeOS

2.1.302 (Claude Code)
Suggested fix

Honour an optional LIFEOS_CLAUDE_LAUNCH environment variable in cmdLaunch as a space-split command prefix (default claude), and append the launcher's own flags after that prefix. With LIFEOS_CLAUDE_LAUNCH="ollama launch claude --", the documented ollama launch [INTEGRATION] [-- [EXTRA_ARGS...]] form receives every LifeOS flag (--append-system-prompt-file, --resume, passthrough flags) after ITS argument separator, and the launch runs through the wrapper. The env var is opt-in; unset behaviour is byte-identical to today.

diff --git a/LifeOS/install/LIFEOS/TOOLS/lifeos.ts b/LifeOS/install/LIFEOS/TOOLS/lifeos.ts
index 69a4718..01578f4 100755
--- a/LifeOS/install/LIFEOS/TOOLS/lifeos.ts
+++ b/LifeOS/install/LIFEOS/TOOLS/lifeos.ts
@@ -549,7 +549,14 @@ async function cmdLaunch(options: { mcp?: string; resume?: boolean; resumeId?: s
 
   requireClaudeCli();
   displayBanner();
-  const args = ["claude"];
+  // LIFEOS_CLAUDE_LAUNCH overrides what actually spawns (default "claude").
+  // Set it to a command prefix — e.g. `ollama launch claude --` — to route the
+  // launch through a wrapper. Split on spaces: it is a short prefix, not a
+  // quoted path; a path form would need argv escaping first.
+  const base = process.env.LIFEOS_CLAUDE_LAUNCH?.trim()
+    ? process.env.LIFEOS_CLAUDE_LAUNCH.trim().split(/\s+/)
+    : ["claude"];
+  const args = base;
 
   // LifeOS System Prompt — constitutional rules appended to Claude Code's system prompt
   // These rules get highest instruction authority (system prompt layer > CLAUDE.md layer)
Verified after fix

Probe: LIFEOS_CLAUDE_LAUNCH='cmd /c echo' bun 'C:~/DevSwarmProjects/LifeOS-upstream/LifeOS/install/LIFEOS/TOOLS/lifeos.ts' -s 'C:~/DevSwarmProjects/LifeOS-upstream/LifeOS/install/LIFEOS/LIFEOS_SYSTEM_PROMPT.md' -- --version · exit 0 · captured 2026-11-28T02:15:52.938Z


                      LifeOS | Your Life Operating System

                      "Magnifying human capabilities..."

                            █████   │  
                            █████   │  "LifeOS here, ready to go..."
                            █████   │  ────────────────────────
                            █████   │  ⬢  LifeOS    8.761.0
                       ██████████   │  ⚙  Algo      8.45.0
                       ██████████   │  ✦  SK        7
                  ███████████████   │  ↪  HOOKS     36
                  ███████████████   │  ────────────────────────
             ████████████████████   │  
             ████████████████████   │  

                      → github.com/danielmiessler/LifeOS

--append-system-prompt-file C:~/DevSwarmProjects/LifeOS-upstream/LifeOS/install/LIFEOS/LIFEOS_SYSTEM_PROMPT.md --version
Environment
  • OS: Windows (x64)
  • Harness: claude-code
  • bun: not found · git: not found
  • Doctor broken: identity-placeholders, shadow-home, codex, interceptor, cloudflare
Lenguaje dominante
TypeScript
Estrellas
20k
Forks
2.5k
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de danielmiessler/LifeOS

Todos los issues de danielmiessler/LifeOS

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.