{
"id": "agent-runtime-impl:opencode.runtime@1.x",
"_kind": "AgentRuntimeImpl",
"_file": "agent-stack/runtime-impls/opencode-runtime-1-x.yaml",
"_cluster": "agent-stack",
"attributes": {
"displayName": "OpenCode Runtime (1.x)",
"agentVersionId": "agent-version:opencode@1.x",
"subagentDispatchMechanism": "task-tool",
"subagentChildSessionPolicy": "ephemeral-child-session",
"subagentToolScopePolicy": "inherit-parent",
"packageRef": "source-ref:opencode-github",
"builtInTools": [
"tool-descriptor:read",
"tool-descriptor:write",
"tool-descriptor:edit",
"tool-descriptor:bash",
"tool-descriptor:grep"
],
"toolRegistryDiscovery": "static-bundled",
"hookSockets": [
"hook-surface:opencode.session-idle",
"hook-surface:opencode.shell-env"
],
"internalSessionStateLocation": "~/.config/opencode/sessions/",
"sessionFileFormat": "jsonl",
"sessionFilePathConvention": "~/.config/opencode/sessions/<session-id>.jsonl",
"approvalGatingPrimitive": "per-call",
"subprocessSandboxStrategy": "wrapped-shell",
"runtimeIdentity": "api-key",
"supportedMCPTransports": [
"mcp-transport:stdio"
],
"supportsStreaming": true
},
"outgoingEdges": [
{
"from": "agent-runtime-impl:opencode.runtime@1.x",
"to": "layer:5-agent-runtime",
"kind": "realizes",
"attributes": {}
},
{
"from": "agent-runtime-impl:opencode.runtime@1.x",
"to": "agent:opencode",
"kind": "composes",
"attributes": {
"role": "runtime"
}
},
{
"from": "agent-runtime-impl:opencode.runtime@1.x",
"to": "hook-surface:opencode.session-idle",
"kind": "exposes",
"attributes": {}
},
{
"from": "agent-runtime-impl:opencode.runtime@1.x",
"to": "hook-surface:opencode.shell-env",
"kind": "exposes",
"attributes": {}
},
{
"from": "agent-runtime-impl:opencode.runtime@1.x",
"to": "tool-descriptor:read",
"kind": "bundles",
"attributes": {}
},
{
"from": "agent-runtime-impl:opencode.runtime@1.x",
"to": "tool-descriptor:write",
"kind": "bundles",
"attributes": {}
},
{
"from": "agent-runtime-impl:opencode.runtime@1.x",
"to": "tool-descriptor:edit",
"kind": "bundles",
"attributes": {}
},
{
"from": "agent-runtime-impl:opencode.runtime@1.x",
"to": "tool-descriptor:bash",
"kind": "bundles",
"attributes": {}
},
{
"from": "agent-runtime-impl:opencode.runtime@1.x",
"to": "tool-descriptor:grep",
"kind": "bundles",
"attributes": {}
},
{
"from": "agent-runtime-impl:opencode.runtime@1.x",
"to": "mcp-transport:stdio",
"kind": "connects",
"attributes": {}
},
{
"from": "agent-runtime-impl:opencode.runtime@1.x",
"to": "capability:mcp-elicitation",
"kind": "supports",
"attributes": {
"versionRange": ">=1.0.0 <2.0.0",
"level": "none",
"notes": "TODO: verify OpenCode MCP client revision. As of cataloguing\nOpenCode's MCP integration is stdio-only and does not appear to\nsurface elicitation prompts. Marked `none` pending source review\nof https://github.com/sst/opencode\n"
}
},
{
"from": "agent-runtime-impl:opencode.runtime@1.x",
"to": "capability:mcp-resource-links",
"kind": "supports",
"attributes": {
"versionRange": ">=1.0.0 <2.0.0",
"level": "none",
"notes": "TODO: verify OpenCode handling of MCP resource-link payloads\n(introduced in MCP 2025-06-18). Marked `none` pending review of\nhttps://github.com/sst/opencode\n"
}
},
{
"from": "agent-runtime-impl:opencode.runtime@1.x",
"to": "capability:mcp-stdio",
"kind": "supports",
"attributes": {
"versionRange": ">=1.0.0 <2.0.0",
"level": "full",
"notes": "OpenCode brokers MCP servers configured per project; stdio is the\ndefault transport.\n"
}
},
{
"from": "agent-runtime-impl:opencode.runtime@1.x",
"to": "capability:mcp-structured-tool-output",
"kind": "supports",
"attributes": {
"versionRange": ">=1.0.0 <2.0.0",
"level": "none",
"notes": "TODO: verify OpenCode handling of MCP `structuredContent` payloads\n(MCP 2025-06-18). As of cataloguing OpenCode flattens tool output\nto text. Marked `none` pending review of\nhttps://github.com/sst/opencode\n"
}
},
{
"from": "agent-runtime-impl:opencode.runtime@1.x",
"to": "capability:supports-mcp",
"kind": "supports",
"attributes": {
"versionRange": ">=1.0.0 <2.0.0",
"level": "full",
"notes": "MCP via stdio.\n"
}
},
{
"from": "agent-runtime-impl:opencode.runtime@1.x",
"to": "capability:supports-subagent-dispatch",
"kind": "supports",
"attributes": {
"versionRange": "*",
"level": "partial",
"notes": "TODO verify -- OpenCode appears to use a Task-style dispatch pattern.\n"
}
},
{
"from": "agent-runtime-impl:opencode.runtime@1.x",
"to": "mcp-transport:stdio",
"kind": "speaks",
"attributes": {}
}
],
"incomingEdges": [
{
"from": "agent-version:opencode@1.x",
"to": "agent-runtime-impl:opencode.runtime@1.x",
"kind": "composed_of",
"attributes": {
"role": "runtime"
}
},
{
"from": "agent-version:opencode-http@current",
"to": "agent-runtime-impl:opencode.runtime@1.x",
"kind": "composed_of",
"attributes": {
"role": "runtime"
}
},
{
"from": "mcp-transport:stdio",
"to": "agent-runtime-impl:opencode.runtime@1.x",
"kind": "spoken_by",
"attributes": {}
}
]
}