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
{{ message }}
Repository navigation
Bug: --spec/--file flags crash opencode sessions on large prompts #98
When using agentctl launch opencode --spec <file> --file <file1> --file <file2>, the opencode process launches but dies silently within seconds. PID shows as dead almost immediately. No error output.
This happens when the combined content of spec + files is large (~50KB+). The content gets inlined into the shell command arguments, likely exceeding argv limits or causing opencode to choke on the escaped content.
What was expected
The session should start and the agent should have access to the file contents.
How to reproduce
# These files total ~44KB
agentctl launch opencode --cwd ~/code/mono-sandbox-archive-hardpin \
--spec docs/artifacts/2026-02/sandbox-archive-node-affinity/SPEC.md \
--file packages/sandbox-k8s/src/archive.ts \
--file backend/task-worker-ts/src/core/brain/workflows/sandbox-lifecycle-sweeper.ts \
-p "Make changes to these files"# Check PID — dies within 5 seconds
sleep 5 && ps -p <pid># DEAD
Workaround: omit --spec/--file, let the agent read files from the worktree itself.
Suggested fix
Write spec/file contents to a temp file and pass the path to opencode, rather than inlining into argv. Or use stdin/pipe.
Environment
agentctl from npm link (local build), opencode 1.2.11 (Homebrew), macOS arm64
Activity
fix: use temp file for large prompts instead of CLI args
fix: use temp file for large prompts instead of CLI args
c-h- commentedon Mar 5, 2026
Fixed in PR #101
fix: use temp file for large prompts instead of CLI args
fix: use temp file for large prompts instead of CLI args (#101)