Summary
A systematic audit of the gstack codebase found 5 high-impact, 6 medium-impact, and 6 low-impact gaps where Claude Code is fully supported but opencode is missing equivalent functionality. These range from silent failures (transcripts never ingested) to hard crashes (migration scripts reference nonexistent paths).
HIGH Impact (runtime failures on opencode)
H1: No walkOpenCodeProjects() in transcript ingestion
File: bin/gstack-memory-ingest.ts:361-527
walkClaudeCodeProjects() scans ~/.claude/projects/<encoded-cwd>/<uuid>.jsonl for session transcripts, but there is no equivalent walkOpenCodeProjects() for ~/.config/opencode/projects/. The walkAllSources() call site at line 521-527 only invokes walkClaudeCodeProjects(ctx) and walkCodexSessions(ctx).
Impact: opencode session transcripts are never ingested into gbrain. The entire memory/miranda pipeline is blind to opencode usage.
H2: Agent type union excludes "opencode"
File: bin/gstack-memory-ingest.ts:104, 532
agent?: "claude-code" | "codex" | "cursor" // line 104
agent: "claude-code" | "codex" // line 532
No "opencode" in the union. Even with a walker, the type system would reject it.
H3: isRemoteHttpMcpMode() only checks ~/.claude.json
File: bin/gstack-memory-ingest.ts:1234-1253
The function reads ~/.claude.json to detect mcpServers.gbrain.{type/transport/url} but never falls back to ~/.config/opencode/opencode.jsonc. Opencode users with remote gbrain MCP will always hit the local PGLite import path instead of the remote-http split-engine path.
H4: setup-gbrain MCP registration uses claude mcp add with no opencode fallback
File: setup-gbrain/SKILL.md.tmpl:496-524
Hardcoded: claude mcp add --scope user --transport http gbrain "$MCP_URL"
No equivalent opencode mcp add ... command. The template acknowledges this (line 36: "claude mcp add and targets Claude Code specifically") but there's no conditional branch for opencode.
H5: All migration scripts hardcode ~/.claude/skills/gstack paths
Files: gstack-upgrade/migrations/v{1.0.0.0,1.1.3.0,1.17.0.0,1.27.0.0,1.37.0.0}.sh
Every migration script assumes the skill root is ~/.claude/skills/gstack/. On opencode-only installs, these scripts fail silently or do nothing.
MEDIUM Impact (degraded behavior on opencode)
M1: generate-routing-injection.ts hardcodes CLAUDE.md
File: scripts/resolvers/preamble/generate-routing-injection.ts:5,9,15,38
Every reference is to CLAUDE.md (creating it, appending routing rules, committing). On opencode the equivalent is AGENTS.md. The pathRewrite in hosts/opencode.ts handles this at generation time, but the resolver logic is claude-centric.
M2: Plan file discovery doesn't search opencode plan dir
Files: scripts/resolvers/review.ts:747, ship/SKILL.md.tmpl
Search path:
for PLAN_DIR in "$HOME/.gstack/projects/$_PLAN_SLUG" "$HOME/.claude/plans" "$HOME/.codex/plans" ".gstack/plans"
Missing: "$HOME/.config/opencode/plans".
M3: Only claude failures are fatal in gen-skill-docs.ts
File: scripts/gen-skill-docs.ts:647-650
If claude host generation fails, CI exits with code 1. If opencode generation breaks, it's silently ignored.
M4: Plugin code references claude paths as fallback
File: gstack-plugin-opencode/src/index.ts:178,193,203
The opencode plugin still falls back to ~/.claude/skills/gstack/bin/gstack-session-update and ~/.claude/skills/gstack/bin as its fallback install location detection.
M5: No opencode test coverage for memory-ingest
File: test/gstack-memory-ingest.test.ts
Tests only cover ~/.claude/projects transcript ingestion. No fixtures or tests for opencode project sessions.
M6: No opencode binary resolution in browse
File: browse/src/claude-bin.ts
Entire module is resolveClaudeBinary() / resolveClaudeCommand(). No resolveOpenCodeBinary() equivalent. The browse sidebar spawns claude as a PTY; there's no parallel infrastructure for opencode.
LOW Impact (cosmetic or mitigated)
| # |
File |
Issue |
| L1 |
142+ .tmpl files |
Hardcoded ~/.claude/skills/gstack/bin/... paths (mitigated by pathRewrite at generation time) |
| L2 |
scripts/resolvers/design.ts:47 |
Hardcoded .claude/skills/review/design-checklist.md (mitigated by pathRewrite) |
| L3 |
scripts/resolvers/review.ts:565,723 |
Source attribution hardcodes "claude" model name |
| L4 |
hosts/opencode.ts |
Missing coAuthorTrailer field that claude.ts has |
| L5 |
scripts/resolvers/preamble/generate-preamble-bash.ts:82-87 |
Vendored check only does .opencode/skills/gstack, not .claude/skills/gstack |
| L6 |
scripts/resolvers/preamble/generate-brain-sync-block.ts:84-93 |
MCP detection checks opencode config with "no claude fallback" |
Areas Already Properly Covered
hosts/opencode.ts -- Full host config with path rewrites
bin/gstack-global-discover.ts -- Has scanOpenCode() walking ~/.config/opencode/projects/
bin/gstack-gbrain-sync.ts -- Host-agnostic, uses env-based config
test/host-config.test.ts -- Tests opencode path rewrites
test/gstack-paths.test.ts -- Tests opencode plan resolution
test/gen-skill-docs.test.ts -- Tests opencode as host
.agents/skills/ -- Generated SKILL.md files with opencode-specific content
Methodology
All findings were produced by a systematic search of the gstack codebase at /home/kiffer/gstack (branch 1.2, repo acharnite/gstack-opencodeai), cross-referencing every reference to "claude" or "opencode" in .ts, .sh, .tmpl, and config files.
Summary
A systematic audit of the gstack codebase found 5 high-impact, 6 medium-impact, and 6 low-impact gaps where Claude Code is fully supported but opencode is missing equivalent functionality. These range from silent failures (transcripts never ingested) to hard crashes (migration scripts reference nonexistent paths).
HIGH Impact (runtime failures on opencode)
H1: No
walkOpenCodeProjects()in transcript ingestionFile:
bin/gstack-memory-ingest.ts:361-527walkClaudeCodeProjects()scans~/.claude/projects/<encoded-cwd>/<uuid>.jsonlfor session transcripts, but there is no equivalentwalkOpenCodeProjects()for~/.config/opencode/projects/. ThewalkAllSources()call site at line 521-527 only invokeswalkClaudeCodeProjects(ctx)andwalkCodexSessions(ctx).Impact: opencode session transcripts are never ingested into gbrain. The entire memory/miranda pipeline is blind to opencode usage.
H2: Agent type union excludes
"opencode"File:
bin/gstack-memory-ingest.ts:104, 532No
"opencode"in the union. Even with a walker, the type system would reject it.H3:
isRemoteHttpMcpMode()only checks~/.claude.jsonFile:
bin/gstack-memory-ingest.ts:1234-1253The function reads
~/.claude.jsonto detectmcpServers.gbrain.{type/transport/url}but never falls back to~/.config/opencode/opencode.jsonc. Opencode users with remote gbrain MCP will always hit the local PGLite import path instead of the remote-http split-engine path.H4:
setup-gbrainMCP registration usesclaude mcp addwith no opencode fallbackFile:
setup-gbrain/SKILL.md.tmpl:496-524Hardcoded:
claude mcp add --scope user --transport http gbrain "$MCP_URL"No equivalent
opencode mcp add ...command. The template acknowledges this (line 36: "claude mcp add and targets Claude Code specifically") but there's no conditional branch for opencode.H5: All migration scripts hardcode
~/.claude/skills/gstackpathsFiles:
gstack-upgrade/migrations/v{1.0.0.0,1.1.3.0,1.17.0.0,1.27.0.0,1.37.0.0}.shEvery migration script assumes the skill root is
~/.claude/skills/gstack/. On opencode-only installs, these scripts fail silently or do nothing.MEDIUM Impact (degraded behavior on opencode)
M1:
generate-routing-injection.tshardcodesCLAUDE.mdFile:
scripts/resolvers/preamble/generate-routing-injection.ts:5,9,15,38Every reference is to
CLAUDE.md(creating it, appending routing rules, committing). On opencode the equivalent isAGENTS.md. The pathRewrite inhosts/opencode.tshandles this at generation time, but the resolver logic is claude-centric.M2: Plan file discovery doesn't search opencode plan dir
Files:
scripts/resolvers/review.ts:747,ship/SKILL.md.tmplSearch path:
Missing:
"$HOME/.config/opencode/plans".M3: Only claude failures are fatal in
gen-skill-docs.tsFile:
scripts/gen-skill-docs.ts:647-650If claude host generation fails, CI exits with code 1. If opencode generation breaks, it's silently ignored.
M4: Plugin code references claude paths as fallback
File:
gstack-plugin-opencode/src/index.ts:178,193,203The opencode plugin still falls back to
~/.claude/skills/gstack/bin/gstack-session-updateand~/.claude/skills/gstack/binas its fallback install location detection.M5: No opencode test coverage for memory-ingest
File:
test/gstack-memory-ingest.test.tsTests only cover
~/.claude/projectstranscript ingestion. No fixtures or tests for opencode project sessions.M6: No opencode binary resolution in browse
File:
browse/src/claude-bin.tsEntire module is
resolveClaudeBinary()/resolveClaudeCommand(). NoresolveOpenCodeBinary()equivalent. The browse sidebar spawnsclaudeas a PTY; there's no parallel infrastructure for opencode.LOW Impact (cosmetic or mitigated)
.tmplfiles~/.claude/skills/gstack/bin/...paths (mitigated by pathRewrite at generation time)scripts/resolvers/design.ts:47.claude/skills/review/design-checklist.md(mitigated by pathRewrite)scripts/resolvers/review.ts:565,723"claude"model namehosts/opencode.tscoAuthorTrailerfield thatclaude.tshasscripts/resolvers/preamble/generate-preamble-bash.ts:82-87.opencode/skills/gstack, not.claude/skills/gstackscripts/resolvers/preamble/generate-brain-sync-block.ts:84-93Areas Already Properly Covered
hosts/opencode.ts-- Full host config with path rewritesbin/gstack-global-discover.ts-- HasscanOpenCode()walking~/.config/opencode/projects/bin/gstack-gbrain-sync.ts-- Host-agnostic, uses env-based configtest/host-config.test.ts-- Tests opencode path rewritestest/gstack-paths.test.ts-- Tests opencode plan resolutiontest/gen-skill-docs.test.ts-- Tests opencode as host.agents/skills/-- Generated SKILL.md files with opencode-specific contentMethodology
All findings were produced by a systematic search of the gstack codebase at
/home/kiffer/gstack(branch1.2, repoacharnite/gstack-opencodeai), cross-referencing every reference to "claude" or "opencode" in.ts,.sh,.tmpl, and config files.