Before submitting
Area
apps/server
Steps to reproduce
- Install opencode v1.18.20 and T3 Code v0.0.34-nightly.20260821.1151 on macOS arm64
- Add 15+ skills to
~/.config/opencode/skills/ (each with SKILL.md frontmatter)
- Start T3 server (
t3 serve)
- Wait for provider snapshot refresh
- Inspect
~/.t3/caches/opencode.json — skills array is empty
To confirm the pipe truncation directly:
# File redirect — full output (138140 bytes)
opencode debug skill > /tmp/skills.json 2>/dev/null && wc -c /tmp/skills.json
# 138140
# Pipe — truncated at 64KB
opencode debug skill 2>/dev/null | wc -c
# 65536
# PTY — full output
script -q /dev/null opencode debug skill 2>/dev/null | wc -c
# 138302
Expected behavior
T3's OpenCode provider cache should list all discovered skills, same as Claude and Codex providers do. Skills should appear in the composer $ picker.
Actual behavior
T3's OpenCode provider cache reports skills: [] and slashCommands: []. Skills are invisible in the composer. Skills with model invocation disabled cannot be discovered or invoked.
Impact
Major degradation or frequent failure
Version or commit
T3 Code v0.0.34-nightly.20260821.1151, OpenCode v1.18.20 (also reproduced on v1.18.18)
Environment
macOS 26.6.2, Apple Silicon arm64. opencode binary is a Bun-compiled Mach-O executable. 26 skills on disk at ~/.config/opencode/skills/. Pipe output: 65536 bytes (truncated from 138140).
Logs or stack traces
~/.t3/caches/opencode.json after refresh:
{
"displayName": "OpenCode",
"enabled": true,
"installed": true,
"version": "1.18.20",
"status": "ready",
"skills": [],
"slashCommands": [],
...
}
Root cause: opencode debug skill produces ~138KB of JSON. When T3 spawns it as a child process without a PTY, stdout is a pipe. The opencode binary (Bun-compiled) does not flush its write buffer properly to non-TTY stdout, so the pipe receives exactly 65536 bytes (64KB) and the rest is lost. The truncated JSON fails to parse in parseSkillsCliOutput, which silently returns []:
function parseSkillsCliOutput(stdout) {
const result = decodeOpenCodeSkillsCliOutputExit(stdout);
return isSuccess$1(result) ? result.value : [];
}
The models (opencode models --verbose) and agents (opencode agent list) commands work fine because their output stays under 64KB.
Workaround
Patch runSkillsCli in bin.mjs to redirect output to a temp file instead of relying on pipe stdout:
const runSkillsCli = () => runOpenCodeCommand({
binaryPath: "sh",
args: ["-c", `${input.binaryPath} debug skill > /tmp/.t3_oc_skills_${process.pid}.json && cat /tmp/.t3_oc_skills_${process.pid}.json && rm -f /tmp/.t3_oc_skills_${process.pid}.json`],
...commandContext
}).pipe(exit);
This patch is lost on npm install -g t3@nightly. PR #7572 (filesystem-based skill discovery) would fix this properly by reading SKILL.md files directly.
Related
Before submitting
Area
apps/server
Steps to reproduce
~/.config/opencode/skills/(each withSKILL.mdfrontmatter)t3 serve)~/.t3/caches/opencode.json—skillsarray is emptyTo confirm the pipe truncation directly:
Expected behavior
T3's OpenCode provider cache should list all discovered skills, same as Claude and Codex providers do. Skills should appear in the composer
$picker.Actual behavior
T3's OpenCode provider cache reports
skills: []andslashCommands: []. Skills are invisible in the composer. Skills with model invocation disabled cannot be discovered or invoked.Impact
Major degradation or frequent failure
Version or commit
T3 Code v0.0.34-nightly.20260821.1151, OpenCode v1.18.20 (also reproduced on v1.18.18)
Environment
macOS 26.6.2, Apple Silicon arm64. opencode binary is a Bun-compiled Mach-O executable. 26 skills on disk at
~/.config/opencode/skills/. Pipe output: 65536 bytes (truncated from 138140).Logs or stack traces
Root cause:
opencode debug skillproduces ~138KB of JSON. When T3 spawns it as a child process without a PTY, stdout is a pipe. The opencode binary (Bun-compiled) does not flush its write buffer properly to non-TTY stdout, so the pipe receives exactly 65536 bytes (64KB) and the rest is lost. The truncated JSON fails to parse inparseSkillsCliOutput, which silently returns[]:The models (
opencode models --verbose) and agents (opencode agent list) commands work fine because their output stays under 64KB.Workaround
Patch
runSkillsCliinbin.mjsto redirect output to a temp file instead of relying on pipe stdout:This patch is lost on
npm install -g t3@nightly. PR #7572 (filesystem-based skill discovery) would fix this properly by readingSKILL.mdfiles directly.Related