fix(Telos): replace subprocess spawn with direct inference() import#911
Open
rikitikitavi2012-debug wants to merge 1 commit intodanielmiessler:mainfrom
Open
Conversation
Replace the spawn('bun', [...Inference.ts, systemPrompt, message])
pattern with a direct import of the inference() function. The old
approach passed both system prompt and user prompt as CLI positional
arguments, which risks hitting OS ARG_MAX limits when the TELOS
context grows large.
The inference() function already handles large inputs safely by
piping user prompts via stdin to the underlying claude process.
Using it directly eliminates the subprocess overhead and the
ARG_MAX surface entirely.
Closes danielmiessler#905
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
child_process.spawn('bun', ['Inference.ts', ...args])with directimport { inference }call in Telos DashboardTemplate chat routeRoot cause
route.tsspawned a subprocess passing system prompt and user message as positional CLI arguments. With rich TELOS context, these can approach OSARG_MAXlimits (128-256KB), causing silent failures.Fix
Direct import of
inference()function which handles prompts internally via stdin, bypassing any argument length limits.Related to #905
Test plan
bash -nsyntax check on modified file🤖 Generated with Claude Code