You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lk agent deploy --silent fails with bufio.Scanner: token too long when the Docker build output contains long lines (e.g., pip install logs).
Without --silent, lk agent deploy hangs on an interactive confirmation prompt in non-interactive shells (CI/CD, automation). So there's no working path for automated deploys in v2.14.0–2.16.0.
Detected agent language [python.pip]
#1 [internal] load remote build context
#1 DONE 1.2s
#2 copy /context /
#2 DONE 0.1s
#3 [internal] load metadata for docker.io/library/python:3.13-slim
#3 DONE 0.8s
unable to deploy agent: bufio.Scanner: token too long
The build starts correctly (steps 1-3 succeed) but crashes when pip install output exceeds the Go bufio.Scanner default buffer size (64KB).
Two Issues
v2.14.0+: lk agent deploy hangs on an interactive prompt when stdin is not a terminal. --silent flag (added in v2.16.0) is the intended fix, but it has bug update recorder #2.
v2.16.0 --silent: Docker build log streaming uses bufio.Scanner which has a default max token size of 64KB. Pip install output can exceed this, causing the scanner to fail.
Expected Behavior
lk agent deploy --silent should complete the Docker build regardless of output line length.
Workaround
Using v2.13.1 (installed via Homebrew, no standalone macOS binary available) works. v2.13.1 didn't have the interactive prompt and handled long build output correctly.
Environment
macOS Darwin 25.4.0 (Apple Silicon)
lk version 2.16.0 (also tested 2.14.0, 2.15.0)
Agent language: python.pip
Project has custom Dockerfile with download-files step removed
Description
lk agent deploy --silentfails withbufio.Scanner: token too longwhen the Docker build output contains long lines (e.g., pip install logs).Without
--silent,lk agent deployhangs on an interactive confirmation prompt in non-interactive shells (CI/CD, automation). So there's no working path for automated deploys in v2.14.0–2.16.0.Reproduction
Output:
The build starts correctly (steps 1-3 succeed) but crashes when pip install output exceeds the Go
bufio.Scannerdefault buffer size (64KB).Two Issues
v2.14.0+:
lk agent deployhangs on an interactive prompt when stdin is not a terminal.--silentflag (added in v2.16.0) is the intended fix, but it has bug update recorder #2.v2.16.0
--silent: Docker build log streaming usesbufio.Scannerwhich has a default max token size of 64KB. Pip install output can exceed this, causing the scanner to fail.Expected Behavior
lk agent deploy --silentshould complete the Docker build regardless of output line length.Workaround
Using v2.13.1 (installed via Homebrew, no standalone macOS binary available) works. v2.13.1 didn't have the interactive prompt and handled long build output correctly.
Environment
download-filesstep removed