fix: opencode compat tool call rendering and default to no-token (#95)

- Fix tool name lost on ToolResult events (persist via tool_name_by_call)
- Fix tool input lost on ToolResult events (persist via tool_args_by_call)
- Fix tool output in wrong field (error -> output)
- Fix text doubling in streaming (defer emit to ItemCompleted)
- Fix missing delta field in text streaming events
- Default server mode to no-token when --token not specified
- Add install-fast-sa and install-fast-gigacode justfile targets
This commit is contained in:
Nathan Flurry 2026-02-06 02:57:23 -08:00 committed by GitHub
parent a02393436c
commit 6a3345b954
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
32 changed files with 9193 additions and 38 deletions

View file

@ -0,0 +1,70 @@
# Native OpenCode vs Sandbox-Agent: OpenCode API Comparison
## Overview
Captured API output from both native OpenCode server (v1.1.49) and sandbox-agent's
OpenCode compatibility layer, sending identical request patterns:
1. Message 1: Simple text response (echo/text)
2. Message 2: Tool call (ls/mock.search)
## Bugs Found and Fixed
### 1. Tool name (`tool` field) changed between events [FIXED]
**Bug**: The `tool` field in tool part events changed between `pending` and `running`/`completed`
states. In the `pending` event it correctly showed `"mock.search"`, but in subsequent events
(from ToolResult) it showed `"tool"` because `extract_tool_content` doesn't return tool_name
for ToolResult items.
**Fix**: Added `tool_name_by_call` HashMap to `OpenCodeSessionRuntime` to persist tool names
from ToolCall events and look them up during ToolResult processing.
### 2. Tool `input` lost on ToolResult events [FIXED]
**Bug**: When the ToolResult event came in, the tool's input arguments were lost because
ToolResult content only contains `call_id` and `output`, not arguments.
**Fix**: Added `tool_args_by_call` HashMap to `OpenCodeSessionRuntime` to persist arguments
from ToolCall events and look them up during ToolResult processing.
### 3. Tool `output` in wrong field (`error` instead of `output`) [FIXED]
**Bug**: When tool result status was `Failed`, the output text was put in `"error"` field.
Native OpenCode uses `"output"` field for tool output regardless of success/failure.
**Fix**: Changed the failed tool result JSON to use `"output"` instead of `"error"`.
### 4. Text doubling in streaming [FIXED]
**Bug**: During text streaming, `ItemStarted` emitted a text part with full content, then
`ItemDelta` appended delta text, then `ItemCompleted` emitted again, causing doubled text.
**Fix**: `ItemStarted` now only initializes empty text in runtime without emitting a part event.
`ItemCompleted` emits the final text using accumulated delta text or fallback to content text.
### 5. Missing `delta` field in text streaming events [FIXED]
**Bug**: `delta` field was not included in `message.part.updated` events for text streaming.
Native OpenCode includes `delta` on streaming events and omits it on the final event.
**Fix**: Changed `apply_item_delta` to use `part_event_with_delta` instead of `part_event`.
### 6. Not bugs (noted for completeness)
- **Missing `step-start`/`step-finish` parts**: These are OpenCode-specific (git snapshot
tracking) and not expected from sandbox-agent.
- **Missing `time` on text parts**: Minor; could be added in future.
- **Missing `time.completed` on some assistant messages**: Minor timing issue.
## Verification
After fixes, all tool events now correctly show:
- `"tool": "mock.search"` across all states (pending, running, error)
- `"input": {"query": "example"}` preserved across all states
- `"output": "mock search results"` on the error event (not `"error"`)
- Text streaming includes `delta` field
- No text doubling
All 28 OpenCode compat tests pass.
All 10 session snapshot tests pass.
All 3 HTTP endpoint tests pass.

View file

@ -0,0 +1,260 @@
/**
* Capture native OpenCode server API output for comparison.
*
* Usage:
* npx tsx capture-native.ts
*
* Starts a native OpenCode headless server, creates a Claude session,
* sends 2 messages (one that triggers tool calls), and captures all
* session events and message snapshots.
*/
import { spawn, type ChildProcess } from "node:child_process";
import { writeFileSync, mkdirSync, existsSync } from "node:fs";
import { createServer, type AddressInfo } from "node:net";
const OUTPUT_DIR = new URL("./snapshots/native", import.meta.url).pathname;
async function getFreePort(): Promise<number> {
return new Promise((resolve, reject) => {
const server = createServer();
server.unref();
server.on("error", reject);
server.listen(0, "127.0.0.1", () => {
const address = server.address() as AddressInfo;
server.close(() => resolve(address.port));
});
});
}
async function waitForHealth(baseUrl: string, timeoutMs = 30_000): Promise<void> {
const start = Date.now();
while (Date.now() - start < timeoutMs) {
try {
const res = await fetch(`${baseUrl}/global/health`);
if (res.ok) return;
} catch {}
await new Promise((r) => setTimeout(r, 300));
}
throw new Error("Timed out waiting for native opencode health");
}
function saveJson(name: string, data: unknown) {
if (!existsSync(OUTPUT_DIR)) mkdirSync(OUTPUT_DIR, { recursive: true });
const path = `${OUTPUT_DIR}/${name}.json`;
writeFileSync(path, JSON.stringify(data, null, 2));
console.log(` [saved] ${path}`);
}
async function waitForIdle(baseUrl: string, sessionId: string, timeoutMs: number): Promise<void> {
const start = Date.now();
// Give a small initial delay for the status to change to busy
await new Promise((r) => setTimeout(r, 500));
while (Date.now() - start < timeoutMs) {
try {
const statusRes = await fetch(`${baseUrl}/session/status`);
const statuses = await statusRes.json();
const sessionStatus = statuses?.[sessionId];
if (sessionStatus?.type === "idle" || sessionStatus === undefined) {
return;
}
} catch {}
await new Promise((r) => setTimeout(r, 500));
}
throw new Error("Timed out waiting for session to become idle");
}
async function main() {
const port = await getFreePort();
const baseUrl = `http://127.0.0.1:${port}`;
console.log(`Starting native OpenCode server on port ${port}...`);
const child: ChildProcess = spawn("opencode", ["serve", "--port", String(port)], {
stdio: "pipe",
env: { ...process.env },
});
let stderr = "";
child.stderr?.on("data", (chunk) => {
stderr += chunk.toString();
});
child.stdout?.on("data", (chunk) => {
const text = chunk.toString();
if (text.includes("listening")) console.log(` [opencode] ${text.trim()}`);
});
// Track all SSE events in a separate array
const allEvents: any[] = [];
let sseAbort: AbortController | null = null;
let currentBaseUrl = "";
try {
await waitForHealth(baseUrl);
currentBaseUrl = baseUrl;
console.log("Native OpenCode server is healthy!");
// 1. Capture initial metadata
const [agentRes, configRes] = await Promise.all([
fetch(`${baseUrl}/agent`).then((r) => r.json()),
fetch(`${baseUrl}/config`).then((r) => r.json()),
]);
saveJson("metadata-agent", agentRes);
saveJson("metadata-config", configRes);
// 2. Start SSE event collection
sseAbort = new AbortController();
const ssePromise = (async () => {
try {
const res = await fetch(`${baseUrl}/event`, {
signal: sseAbort!.signal,
headers: { Accept: "text/event-stream" },
});
if (!res.ok || !res.body) {
console.error("SSE connection failed:", res.status);
return;
}
const reader = res.body.getReader();
const decoder = new TextDecoder();
let buffer = "";
while (true) {
const { done, value } = await reader.read();
if (done) break;
buffer += decoder.decode(value, { stream: true });
const lines = buffer.split("\n");
buffer = lines.pop() || "";
for (const line of lines) {
if (line.startsWith("data: ")) {
try {
const parsed = JSON.parse(line.slice(6));
allEvents.push(parsed);
// Auto-approve permissions
if (parsed.type === "permission.asked" && parsed.properties?.id) {
const permId = parsed.properties.id;
console.log(` [auto-approving permission ${permId}]`);
fetch(`${currentBaseUrl}/permission/${permId}/reply`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ allow: true }),
}).catch(() => {});
}
} catch {}
}
}
}
} catch (err: any) {
if (err.name !== "AbortError") {
// Ignore - expected when server closes
}
}
})();
// Give SSE time to connect
await new Promise((r) => setTimeout(r, 500));
// 3. Create a session
console.log("Creating session...");
const sessionRes = await fetch(`${baseUrl}/session`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({}),
});
const session = await sessionRes.json();
saveJson("session-create", session);
const sessionId = session.id;
console.log(` Session ID: ${sessionId}`);
// Use anthropic provider with a cheap model for testing
const model = { providerID: "anthropic", modelID: "claude-haiku-4-5" };
// 4. Send first message (simple text response) - use prompt_async + wait
console.log("Sending message 1 (simple text)...");
await fetch(`${baseUrl}/session/${sessionId}/prompt_async`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
model,
parts: [{ type: "text", text: "Respond with exactly: 'Hello from OpenCode'. Nothing else." }],
}),
});
// Wait for the response to be fully processed
console.log(" Waiting for message 1 to complete...");
await waitForIdle(baseUrl, sessionId, 60_000);
await new Promise((r) => setTimeout(r, 1000));
// 5. Get messages after first request
const messagesAfter1 = await fetch(`${baseUrl}/session/${sessionId}/message`).then((r) =>
r.json()
);
saveJson("messages-after-1", messagesAfter1);
console.log(` Got ${messagesAfter1.length} messages after msg 1`);
// 6. Send second message (ask for a tool call - file write) - use prompt_async
console.log("Sending message 2 (should trigger tool calls)...");
await fetch(`${baseUrl}/session/${sessionId}/prompt_async`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
model,
parts: [
{
type: "text",
text: "List the files in the current directory. Use the list/ls tool. Only list the top-level contents, do not recurse.",
},
],
}),
});
// Wait for completion (longer timeout for tool calls + permissions)
console.log(" Waiting for message 2 to complete...");
try {
await waitForIdle(baseUrl, sessionId, 120_000);
} catch (e) {
console.log(" Warning: timed out waiting for idle, capturing what we have...");
}
await new Promise((r) => setTimeout(r, 2000));
// 7. Get messages after second request
const messagesAfter2 = await fetch(`${baseUrl}/session/${sessionId}/message`).then((r) =>
r.json()
);
saveJson("messages-after-2", messagesAfter2);
console.log(` Got ${messagesAfter2.length} messages after msg 2`);
// 8. Get session details
const sessionDetails = await fetch(`${baseUrl}/session/${sessionId}`).then((r) => r.json());
saveJson("session-details", sessionDetails);
// 9. Get session status
const sessionStatus = await fetch(`${baseUrl}/session/status`).then((r) => r.json());
saveJson("session-status", sessionStatus);
// 10. Stop SSE and save events
sseAbort.abort();
await new Promise((r) => setTimeout(r, 500));
saveJson("all-events", allEvents);
// Filter events for this session
const sessionEvents = allEvents.filter(
(e) => e.properties?.sessionID === sessionId ||
(e.type === "session.created" && e.properties?.info?.id === sessionId)
);
saveJson("session-events", sessionEvents);
console.log(`\nCapture complete! ${allEvents.length} total events, ${sessionEvents.length} session events.`);
console.log(`Output saved to: ${OUTPUT_DIR}/`);
} finally {
if (sseAbort) sseAbort.abort();
child.kill("SIGTERM");
await new Promise((r) => setTimeout(r, 1000));
if (child.exitCode === null) child.kill("SIGKILL");
}
}
main().catch((err) => {
console.error("Fatal error:", err);
process.exit(1);
});

View file

@ -0,0 +1,249 @@
/**
* Capture sandbox-agent OpenCode compatibility API output for comparison.
*
* Usage:
* npx tsx capture-sandbox-agent.ts
*
* Starts sandbox-agent with mock agent, creates a session via /opencode API,
* sends 2 messages (text + tool call), and captures all events/messages.
*/
import { spawn, type ChildProcess } from "node:child_process";
import { writeFileSync, mkdirSync, existsSync } from "node:fs";
import { createServer, type AddressInfo } from "node:net";
import { randomBytes } from "node:crypto";
const OUTPUT_DIR = new URL("./snapshots/sandbox-agent", import.meta.url).pathname;
async function getFreePort(): Promise<number> {
return new Promise((resolve, reject) => {
const server = createServer();
server.unref();
server.on("error", reject);
server.listen(0, "127.0.0.1", () => {
const address = server.address() as AddressInfo;
server.close(() => resolve(address.port));
});
});
}
async function waitForHealth(baseUrl: string, token: string, timeoutMs = 30_000): Promise<void> {
const start = Date.now();
while (Date.now() - start < timeoutMs) {
try {
const res = await fetch(`${baseUrl}/v1/health`, {
headers: { Authorization: `Bearer ${token}` },
});
if (res.ok) return;
} catch {}
await new Promise((r) => setTimeout(r, 300));
}
throw new Error("Timed out waiting for sandbox-agent health");
}
function saveJson(name: string, data: unknown) {
if (!existsSync(OUTPUT_DIR)) mkdirSync(OUTPUT_DIR, { recursive: true });
const path = `${OUTPUT_DIR}/${name}.json`;
writeFileSync(path, JSON.stringify(data, null, 2));
console.log(` [saved] ${path}`);
}
async function main() {
const port = await getFreePort();
const host = "127.0.0.1";
const baseUrl = `http://${host}:${port}`;
const opencodeUrl = `${baseUrl}/opencode`;
const token = randomBytes(24).toString("hex");
console.log(`Starting sandbox-agent on port ${port}...`);
// Use the locally built binary, not the installed one
const binaryPath = new URL("../../target/release/sandbox-agent", import.meta.url).pathname;
const child: ChildProcess = spawn(
binaryPath,
["server", "--host", host, "--port", String(port), "--token", token],
{
stdio: "pipe",
env: {
...process.env,
SANDBOX_AGENT_SKIP_INSPECTOR: "1",
},
}
);
let stderr = "";
child.stderr?.on("data", (chunk) => {
stderr += chunk.toString();
});
const allEvents: any[] = [];
let sseAbort: AbortController | null = null;
try {
await waitForHealth(baseUrl, token);
console.log("sandbox-agent is healthy!");
// 1. Capture initial metadata via /opencode routes
const headers = { Authorization: `Bearer ${token}` };
const [agentRes, configRes] = await Promise.all([
fetch(`${opencodeUrl}/agent`, { headers }).then((r) => r.json()),
fetch(`${opencodeUrl}/config`, { headers }).then((r) => r.json()),
]);
saveJson("metadata-agent", agentRes);
saveJson("metadata-config", configRes);
// 2. Start SSE event collection
sseAbort = new AbortController();
const ssePromise = (async () => {
try {
const res = await fetch(`${opencodeUrl}/event`, {
signal: sseAbort!.signal,
headers: { ...headers, Accept: "text/event-stream" },
});
if (!res.ok || !res.body) {
console.error("SSE connection failed:", res.status, await res.text());
return;
}
const reader = res.body.getReader();
const decoder = new TextDecoder();
let buffer = "";
while (true) {
const { done, value } = await reader.read();
if (done) break;
buffer += decoder.decode(value, { stream: true });
const lines = buffer.split("\n");
buffer = lines.pop() || "";
for (const line of lines) {
if (line.startsWith("data: ")) {
try {
const parsed = JSON.parse(line.slice(6));
allEvents.push(parsed);
} catch {}
}
}
}
} catch (err: any) {
if (err.name !== "AbortError") {
// ignore
}
}
})();
// Give SSE time to connect
await new Promise((r) => setTimeout(r, 500));
// 3. Create a session
console.log("Creating session...");
const sessionRes = await fetch(`${opencodeUrl}/session`, {
method: "POST",
headers: { ...headers, "Content-Type": "application/json" },
body: JSON.stringify({}),
});
const session = await sessionRes.json();
saveJson("session-create", session);
const sessionId = session.id;
console.log(` Session ID: ${sessionId}`);
// 4. Send first message (simple text response) using mock agent's "echo" command
console.log("Sending message 1 (simple text - echo)...");
const msg1Res = await fetch(`${opencodeUrl}/session/${sessionId}/prompt_async`, {
method: "POST",
headers: { ...headers, "Content-Type": "application/json" },
body: JSON.stringify({
model: { providerID: "sandbox-agent", modelID: "mock" },
parts: [{ type: "text", text: "echo Hello from sandbox-agent" }],
}),
});
console.log(` prompt_async status: ${msg1Res.status}`);
// Wait for idle
console.log(" Waiting for message 1 to complete...");
await waitForIdle(opencodeUrl, sessionId, headers, 30_000);
await new Promise((r) => setTimeout(r, 1000));
// 5. Get messages after first request
const messagesAfter1 = await fetch(`${opencodeUrl}/session/${sessionId}/message`, { headers }).then((r) => r.json());
saveJson("messages-after-1", messagesAfter1);
console.log(` Got ${messagesAfter1.length} messages after msg 1`);
// 6. Send second message (trigger tool calls) using mock agent's "tool" command
console.log("Sending message 2 (tool calls)...");
const msg2Res = await fetch(`${opencodeUrl}/session/${sessionId}/prompt_async`, {
method: "POST",
headers: { ...headers, "Content-Type": "application/json" },
body: JSON.stringify({
model: { providerID: "sandbox-agent", modelID: "mock" },
parts: [{ type: "text", text: "tool" }],
}),
});
console.log(` prompt_async status: ${msg2Res.status}`);
// Wait for completion
console.log(" Waiting for message 2 to complete...");
await waitForIdle(opencodeUrl, sessionId, headers, 30_000);
await new Promise((r) => setTimeout(r, 1000));
// 7. Get messages after second request
const messagesAfter2 = await fetch(`${opencodeUrl}/session/${sessionId}/message`, { headers }).then((r) => r.json());
saveJson("messages-after-2", messagesAfter2);
console.log(` Got ${messagesAfter2.length} messages after msg 2`);
// 8. Get session details
const sessionDetails = await fetch(`${opencodeUrl}/session/${sessionId}`, { headers }).then((r) => r.json());
saveJson("session-details", sessionDetails);
// 9. Get session status
const sessionStatus = await fetch(`${opencodeUrl}/session/status`, { headers }).then((r) => r.json());
saveJson("session-status", sessionStatus);
// 10. Stop SSE and save events
sseAbort.abort();
await new Promise((r) => setTimeout(r, 500));
saveJson("all-events", allEvents);
// Filter session events
const sessionEvents = allEvents.filter(
(e) =>
e.properties?.sessionID === sessionId ||
(e.type === "session.created" && e.properties?.info?.id === sessionId)
);
saveJson("session-events", sessionEvents);
console.log(`\nCapture complete! ${allEvents.length} total events, ${sessionEvents.length} session events.`);
console.log(`Output saved to: ${OUTPUT_DIR}/`);
} finally {
if (sseAbort) sseAbort.abort();
child.kill("SIGTERM");
await new Promise((r) => setTimeout(r, 1000));
if (child.exitCode === null) child.kill("SIGKILL");
}
}
async function waitForIdle(
opencodeUrl: string,
sessionId: string,
headers: Record<string, string>,
timeoutMs: number
): Promise<void> {
const start = Date.now();
await new Promise((r) => setTimeout(r, 500));
while (Date.now() - start < timeoutMs) {
try {
const statusRes = await fetch(`${opencodeUrl}/session/status`, { headers });
const statuses = await statusRes.json();
const sessionStatus = statuses?.[sessionId];
if (sessionStatus?.type === "idle" || sessionStatus === undefined) {
return;
}
} catch {}
await new Promise((r) => setTimeout(r, 300));
}
throw new Error("Timed out waiting for session to become idle");
}
main().catch((err) => {
console.error("Fatal error:", err);
process.exit(1);
});

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,69 @@
{
"info": {
"id": "msg_c31b8e048001p0fSvme0VWmKR0",
"sessionID": "ses_3ce471fc8ffeS9ZUpB7rVDen7k",
"role": "assistant",
"time": {
"created": 1770360725576,
"completed": 1770360727252
},
"parentID": "msg_c31b8e040001pIkL4AzVtzdVRd",
"modelID": "claude-haiku-4-5",
"providerID": "anthropic",
"mode": "build",
"agent": "build",
"path": {
"cwd": "/home/nathan/sandbox-agent/research/opencode-compat",
"root": "/home/nathan/sandbox-agent"
},
"cost": 0,
"tokens": {
"input": 2,
"output": 7,
"reasoning": 0,
"cache": {
"read": 0,
"write": 13540
}
},
"finish": "stop"
},
"parts": [
{
"id": "prt_c31b8e6b10012vw5mZVWX51UQm",
"sessionID": "ses_3ce471fc8ffeS9ZUpB7rVDen7k",
"messageID": "msg_c31b8e048001p0fSvme0VWmKR0",
"type": "step-start",
"snapshot": "f93f1b3f790c9b1fe51007d1b4a46bcb2d528a91"
},
{
"id": "prt_c31b8e6b1002OBaD5M55iOVva6",
"sessionID": "ses_3ce471fc8ffeS9ZUpB7rVDen7k",
"messageID": "msg_c31b8e048001p0fSvme0VWmKR0",
"type": "text",
"text": "Hello from OpenCode",
"time": {
"start": 1770360727218,
"end": 1770360727218
}
},
{
"id": "prt_c31b8e6cd0012b1geOngJvrf2q",
"sessionID": "ses_3ce471fc8ffeS9ZUpB7rVDen7k",
"messageID": "msg_c31b8e048001p0fSvme0VWmKR0",
"type": "step-finish",
"reason": "stop",
"snapshot": "f93f1b3f790c9b1fe51007d1b4a46bcb2d528a91",
"cost": 0,
"tokens": {
"input": 2,
"output": 7,
"reasoning": 0,
"cache": {
"read": 0,
"write": 13540
}
}
}
]
}

View file

@ -0,0 +1,52 @@
{
"info": {
"id": "msg_c31b349c3001C3jUz57fj5vRae",
"sessionID": "ses_3ce4cbd76ffeHVa3mLvB00FXDV",
"role": "assistant",
"time": {
"created": 1770360359363,
"completed": 1770360359565
},
"error": {
"name": "APIError",
"data": {
"message": "Unauthorized: {\"type\":\"error\",\"error\":{\"type\":\"AuthError\",\"message\":\"Invalid API key.\"}}",
"statusCode": 401,
"isRetryable": false,
"responseHeaders": {
"cf-placement": "local-SJC",
"cf-ray": "9c98b01658355024-SJC",
"connection": "keep-alive",
"content-length": "74",
"content-type": "text/plain;charset=UTF-8",
"date": "Fri, 06 Feb 2026 06:45:59 GMT",
"server": "cloudflare"
},
"responseBody": "{\"type\":\"error\",\"error\":{\"type\":\"AuthError\",\"message\":\"Invalid API key.\"}}",
"metadata": {
"url": "https://opencode.ai/zen/v1/models/gemini-3-pro:streamGenerateContent?alt=sse"
}
}
},
"parentID": "msg_c31b349c2001kJD7I7MRSAVo57",
"modelID": "gemini-3-pro",
"providerID": "opencode",
"mode": "build",
"agent": "build",
"path": {
"cwd": "/home/nathan/sandbox-agent/research/opencode-compat",
"root": "/home/nathan/sandbox-agent"
},
"cost": 0,
"tokens": {
"input": 0,
"output": 0,
"reasoning": 0,
"cache": {
"read": 0,
"write": 0
}
}
},
"parts": []
}

View file

@ -0,0 +1,99 @@
[
{
"info": {
"id": "msg_c31bd424c001ICzhibLcSkazYE",
"sessionID": "ses_3ce42bdb9ffeEIUUu08AuKTJms",
"role": "user",
"time": {
"created": 1770361012812
},
"summary": {
"title": "Hello from OpenCode",
"diffs": []
},
"agent": "build",
"model": {
"providerID": "anthropic",
"modelID": "claude-haiku-4-5"
}
},
"parts": [
{
"id": "prt_c31bd424c002I8ASgZXZGMnUf2",
"sessionID": "ses_3ce42bdb9ffeEIUUu08AuKTJms",
"messageID": "msg_c31bd424c001ICzhibLcSkazYE",
"type": "text",
"text": "Respond with exactly: 'Hello from OpenCode'. Nothing else."
}
]
},
{
"info": {
"id": "msg_c31bd4260001o9JzwTa1Ops17t",
"sessionID": "ses_3ce42bdb9ffeEIUUu08AuKTJms",
"role": "assistant",
"time": {
"created": 1770361012832,
"completed": 1770361014171
},
"parentID": "msg_c31bd424c001ICzhibLcSkazYE",
"modelID": "claude-haiku-4-5",
"providerID": "anthropic",
"mode": "build",
"agent": "build",
"path": {
"cwd": "/home/nathan/sandbox-agent/research/opencode-compat",
"root": "/home/nathan/sandbox-agent"
},
"cost": 0,
"tokens": {
"input": 2,
"output": 7,
"reasoning": 0,
"cache": {
"read": 13540,
"write": 0
}
},
"finish": "stop"
},
"parts": [
{
"id": "prt_c31bd4779001QLU4EXzj63WQ4W",
"sessionID": "ses_3ce42bdb9ffeEIUUu08AuKTJms",
"messageID": "msg_c31bd4260001o9JzwTa1Ops17t",
"type": "step-start",
"snapshot": "302d31eedbdd77a5b1eb84e2fbc4e99e8b97e549"
},
{
"id": "prt_c31bd477c001Gq3CWQQXR1h7fD",
"sessionID": "ses_3ce42bdb9ffeEIUUu08AuKTJms",
"messageID": "msg_c31bd4260001o9JzwTa1Ops17t",
"type": "text",
"text": "Hello from OpenCode",
"time": {
"start": 1770361014146,
"end": 1770361014146
}
},
{
"id": "prt_c31bd4793001LdK7WQwiUgzctY",
"sessionID": "ses_3ce42bdb9ffeEIUUu08AuKTJms",
"messageID": "msg_c31bd4260001o9JzwTa1Ops17t",
"type": "step-finish",
"reason": "stop",
"snapshot": "302d31eedbdd77a5b1eb84e2fbc4e99e8b97e549",
"cost": 0,
"tokens": {
"input": 2,
"output": 7,
"reasoning": 0,
"cache": {
"read": 13540,
"write": 0
}
}
}
]
}
]

View file

@ -0,0 +1,281 @@
[
{
"info": {
"id": "msg_c31bd424c001ICzhibLcSkazYE",
"sessionID": "ses_3ce42bdb9ffeEIUUu08AuKTJms",
"role": "user",
"time": {
"created": 1770361012812
},
"summary": {
"title": "Hello from OpenCode",
"diffs": []
},
"agent": "build",
"model": {
"providerID": "anthropic",
"modelID": "claude-haiku-4-5"
}
},
"parts": [
{
"id": "prt_c31bd424c002I8ASgZXZGMnUf2",
"sessionID": "ses_3ce42bdb9ffeEIUUu08AuKTJms",
"messageID": "msg_c31bd424c001ICzhibLcSkazYE",
"type": "text",
"text": "Respond with exactly: 'Hello from OpenCode'. Nothing else."
}
]
},
{
"info": {
"id": "msg_c31bd4260001o9JzwTa1Ops17t",
"sessionID": "ses_3ce42bdb9ffeEIUUu08AuKTJms",
"role": "assistant",
"time": {
"created": 1770361012832,
"completed": 1770361014171
},
"parentID": "msg_c31bd424c001ICzhibLcSkazYE",
"modelID": "claude-haiku-4-5",
"providerID": "anthropic",
"mode": "build",
"agent": "build",
"path": {
"cwd": "/home/nathan/sandbox-agent/research/opencode-compat",
"root": "/home/nathan/sandbox-agent"
},
"cost": 0,
"tokens": {
"input": 2,
"output": 7,
"reasoning": 0,
"cache": {
"read": 13540,
"write": 0
}
},
"finish": "stop"
},
"parts": [
{
"id": "prt_c31bd4779001QLU4EXzj63WQ4W",
"sessionID": "ses_3ce42bdb9ffeEIUUu08AuKTJms",
"messageID": "msg_c31bd4260001o9JzwTa1Ops17t",
"type": "step-start",
"snapshot": "302d31eedbdd77a5b1eb84e2fbc4e99e8b97e549"
},
{
"id": "prt_c31bd477c001Gq3CWQQXR1h7fD",
"sessionID": "ses_3ce42bdb9ffeEIUUu08AuKTJms",
"messageID": "msg_c31bd4260001o9JzwTa1Ops17t",
"type": "text",
"text": "Hello from OpenCode",
"time": {
"start": 1770361014146,
"end": 1770361014146
}
},
{
"id": "prt_c31bd4793001LdK7WQwiUgzctY",
"sessionID": "ses_3ce42bdb9ffeEIUUu08AuKTJms",
"messageID": "msg_c31bd4260001o9JzwTa1Ops17t",
"type": "step-finish",
"reason": "stop",
"snapshot": "302d31eedbdd77a5b1eb84e2fbc4e99e8b97e549",
"cost": 0,
"tokens": {
"input": 2,
"output": 7,
"reasoning": 0,
"cache": {
"read": 13540,
"write": 0
}
}
}
]
},
{
"info": {
"id": "msg_c31bd4c1b001xWoyoqqLd1Y28L",
"sessionID": "ses_3ce42bdb9ffeEIUUu08AuKTJms",
"role": "user",
"time": {
"created": 1770361015323
},
"summary": {
"title": "List directory contents",
"diffs": []
},
"agent": "build",
"model": {
"providerID": "anthropic",
"modelID": "claude-haiku-4-5"
}
},
"parts": [
{
"id": "prt_c31bd4c1b00250iBBBWSNWnE4G",
"sessionID": "ses_3ce42bdb9ffeEIUUu08AuKTJms",
"messageID": "msg_c31bd4c1b001xWoyoqqLd1Y28L",
"type": "text",
"text": "List the files in the current directory. Use the list/ls tool. Only list the top-level contents, do not recurse."
}
]
},
{
"info": {
"id": "msg_c31bd4c1c001iWeGOWfwf5UD2Y",
"sessionID": "ses_3ce42bdb9ffeEIUUu08AuKTJms",
"role": "assistant",
"time": {
"created": 1770361015324,
"completed": 1770361016339
},
"parentID": "msg_c31bd4c1b001xWoyoqqLd1Y28L",
"modelID": "claude-haiku-4-5",
"providerID": "anthropic",
"mode": "build",
"agent": "build",
"path": {
"cwd": "/home/nathan/sandbox-agent/research/opencode-compat",
"root": "/home/nathan/sandbox-agent"
},
"cost": 0,
"tokens": {
"input": 2,
"output": 78,
"reasoning": 0,
"cache": {
"read": 13547,
"write": 31
}
},
"finish": "tool-calls"
},
"parts": [
{
"id": "prt_c31bd4ef7001AOk3Asd0o7j5fD",
"sessionID": "ses_3ce42bdb9ffeEIUUu08AuKTJms",
"messageID": "msg_c31bd4c1c001iWeGOWfwf5UD2Y",
"type": "step-start",
"snapshot": "8793fb311ffba7bff79cd1b25f87942c22349ae3"
},
{
"id": "prt_c31bd4ef8001ovzy76OXAT5Qin",
"sessionID": "ses_3ce42bdb9ffeEIUUu08AuKTJms",
"messageID": "msg_c31bd4c1c001iWeGOWfwf5UD2Y",
"type": "tool",
"callID": "toolu_017THj1iZNELroZgmFbqC6Ma",
"tool": "bash",
"state": {
"status": "completed",
"input": {
"command": "ls -la",
"description": "List files in current directory"
},
"output": "total 24\ndrwxr-xr-x 3 nathan nathan 4096 Feb 5 22:56 .\ndrwxr-xr-x 5 nathan nathan 4096 Feb 5 22:44 ..\n-rw-r--r-- 1 nathan nathan 9120 Feb 5 22:56 capture-native.ts\ndrwxr-xr-x 3 nathan nathan 4096 Feb 5 22:45 snapshots\n",
"title": "List files in current directory",
"metadata": {
"output": "total 24\ndrwxr-xr-x 3 nathan nathan 4096 Feb 5 22:56 .\ndrwxr-xr-x 5 nathan nathan 4096 Feb 5 22:44 ..\n-rw-r--r-- 1 nathan nathan 9120 Feb 5 22:56 capture-native.ts\ndrwxr-xr-x 3 nathan nathan 4096 Feb 5 22:45 snapshots\n",
"exit": 0,
"description": "List files in current directory",
"truncated": false
},
"time": {
"start": 1770361016309,
"end": 1770361016330
}
}
},
{
"id": "prt_c31bd500e001MnhwCXaWI2pfAw",
"sessionID": "ses_3ce42bdb9ffeEIUUu08AuKTJms",
"messageID": "msg_c31bd4c1c001iWeGOWfwf5UD2Y",
"type": "step-finish",
"reason": "tool-calls",
"snapshot": "8793fb311ffba7bff79cd1b25f87942c22349ae3",
"cost": 0,
"tokens": {
"input": 2,
"output": 78,
"reasoning": 0,
"cache": {
"read": 13547,
"write": 31
}
}
}
]
},
{
"info": {
"id": "msg_c31bd5014001lZUdLPnaNuUzrb",
"sessionID": "ses_3ce42bdb9ffeEIUUu08AuKTJms",
"role": "assistant",
"time": {
"created": 1770361016340,
"completed": 1770361017458
},
"parentID": "msg_c31bd4c1b001xWoyoqqLd1Y28L",
"modelID": "claude-haiku-4-5",
"providerID": "anthropic",
"mode": "build",
"agent": "build",
"path": {
"cwd": "/home/nathan/sandbox-agent/research/opencode-compat",
"root": "/home/nathan/sandbox-agent"
},
"cost": 0,
"tokens": {
"input": 5,
"output": 38,
"reasoning": 0,
"cache": {
"read": 13578,
"write": 207
}
},
"finish": "stop"
},
"parts": [
{
"id": "prt_c31bd53580017z4yaEbtkZX0zx",
"sessionID": "ses_3ce42bdb9ffeEIUUu08AuKTJms",
"messageID": "msg_c31bd5014001lZUdLPnaNuUzrb",
"type": "step-start",
"snapshot": "8793fb311ffba7bff79cd1b25f87942c22349ae3"
},
{
"id": "prt_c31bd53580021848cNw3geDcGF",
"sessionID": "ses_3ce42bdb9ffeEIUUu08AuKTJms",
"messageID": "msg_c31bd5014001lZUdLPnaNuUzrb",
"type": "text",
"text": "Here are the top-level contents of the current directory:\n\n- **capture-native.ts** - A TypeScript file\n- **snapshots/** - A directory",
"time": {
"start": 1770361017436,
"end": 1770361017436
}
},
{
"id": "prt_c31bd546d001cppsZFrg2ZJy7S",
"sessionID": "ses_3ce42bdb9ffeEIUUu08AuKTJms",
"messageID": "msg_c31bd5014001lZUdLPnaNuUzrb",
"type": "step-finish",
"reason": "stop",
"snapshot": "8793fb311ffba7bff79cd1b25f87942c22349ae3",
"cost": 0,
"tokens": {
"input": 5,
"output": 38,
"reasoning": 0,
"cache": {
"read": 13578,
"write": 207
}
}
}
]
}
]

View file

@ -0,0 +1,605 @@
[
{
"name": "build",
"description": "The default agent. Executes tools based on configured permissions.",
"options": {},
"permission": [
{
"permission": "*",
"action": "allow",
"pattern": "*"
},
{
"permission": "doom_loop",
"action": "ask",
"pattern": "*"
},
{
"permission": "external_directory",
"pattern": "*",
"action": "ask"
},
{
"permission": "external_directory",
"pattern": "/home/nathan/.local/share/opencode/tool-output/*",
"action": "allow"
},
{
"permission": "question",
"action": "deny",
"pattern": "*"
},
{
"permission": "plan_enter",
"action": "deny",
"pattern": "*"
},
{
"permission": "plan_exit",
"action": "deny",
"pattern": "*"
},
{
"permission": "read",
"pattern": "*",
"action": "allow"
},
{
"permission": "read",
"pattern": "*.env",
"action": "ask"
},
{
"permission": "read",
"pattern": "*.env.*",
"action": "ask"
},
{
"permission": "read",
"pattern": "*.env.example",
"action": "allow"
},
{
"permission": "question",
"action": "allow",
"pattern": "*"
},
{
"permission": "plan_enter",
"action": "allow",
"pattern": "*"
},
{
"permission": "external_directory",
"pattern": "/home/nathan/.local/share/opencode/tool-output/*",
"action": "allow"
}
],
"mode": "primary",
"native": true
},
{
"name": "plan",
"description": "Plan mode. Disallows all edit tools.",
"options": {},
"permission": [
{
"permission": "*",
"action": "allow",
"pattern": "*"
},
{
"permission": "doom_loop",
"action": "ask",
"pattern": "*"
},
{
"permission": "external_directory",
"pattern": "*",
"action": "ask"
},
{
"permission": "external_directory",
"pattern": "/home/nathan/.local/share/opencode/tool-output/*",
"action": "allow"
},
{
"permission": "question",
"action": "deny",
"pattern": "*"
},
{
"permission": "plan_enter",
"action": "deny",
"pattern": "*"
},
{
"permission": "plan_exit",
"action": "deny",
"pattern": "*"
},
{
"permission": "read",
"pattern": "*",
"action": "allow"
},
{
"permission": "read",
"pattern": "*.env",
"action": "ask"
},
{
"permission": "read",
"pattern": "*.env.*",
"action": "ask"
},
{
"permission": "read",
"pattern": "*.env.example",
"action": "allow"
},
{
"permission": "question",
"action": "allow",
"pattern": "*"
},
{
"permission": "plan_exit",
"action": "allow",
"pattern": "*"
},
{
"permission": "external_directory",
"pattern": "/home/nathan/.local/share/opencode/plans/*",
"action": "allow"
},
{
"permission": "edit",
"pattern": "*",
"action": "deny"
},
{
"permission": "edit",
"pattern": ".opencode/plans/*.md",
"action": "allow"
},
{
"permission": "edit",
"pattern": "../.local/share/opencode/plans/*.md",
"action": "allow"
},
{
"permission": "external_directory",
"pattern": "/home/nathan/.local/share/opencode/tool-output/*",
"action": "allow"
}
],
"mode": "primary",
"native": true
},
{
"name": "general",
"description": "General-purpose agent for researching complex questions and executing multi-step tasks. Use this agent to execute multiple units of work in parallel.",
"permission": [
{
"permission": "*",
"action": "allow",
"pattern": "*"
},
{
"permission": "doom_loop",
"action": "ask",
"pattern": "*"
},
{
"permission": "external_directory",
"pattern": "*",
"action": "ask"
},
{
"permission": "external_directory",
"pattern": "/home/nathan/.local/share/opencode/tool-output/*",
"action": "allow"
},
{
"permission": "question",
"action": "deny",
"pattern": "*"
},
{
"permission": "plan_enter",
"action": "deny",
"pattern": "*"
},
{
"permission": "plan_exit",
"action": "deny",
"pattern": "*"
},
{
"permission": "read",
"pattern": "*",
"action": "allow"
},
{
"permission": "read",
"pattern": "*.env",
"action": "ask"
},
{
"permission": "read",
"pattern": "*.env.*",
"action": "ask"
},
{
"permission": "read",
"pattern": "*.env.example",
"action": "allow"
},
{
"permission": "todoread",
"action": "deny",
"pattern": "*"
},
{
"permission": "todowrite",
"action": "deny",
"pattern": "*"
},
{
"permission": "external_directory",
"pattern": "/home/nathan/.local/share/opencode/tool-output/*",
"action": "allow"
}
],
"options": {},
"mode": "subagent",
"native": true
},
{
"name": "explore",
"permission": [
{
"permission": "*",
"action": "allow",
"pattern": "*"
},
{
"permission": "doom_loop",
"action": "ask",
"pattern": "*"
},
{
"permission": "external_directory",
"pattern": "*",
"action": "ask"
},
{
"permission": "external_directory",
"pattern": "/home/nathan/.local/share/opencode/tool-output/*",
"action": "allow"
},
{
"permission": "question",
"action": "deny",
"pattern": "*"
},
{
"permission": "plan_enter",
"action": "deny",
"pattern": "*"
},
{
"permission": "plan_exit",
"action": "deny",
"pattern": "*"
},
{
"permission": "read",
"pattern": "*",
"action": "allow"
},
{
"permission": "read",
"pattern": "*.env",
"action": "ask"
},
{
"permission": "read",
"pattern": "*.env.*",
"action": "ask"
},
{
"permission": "read",
"pattern": "*.env.example",
"action": "allow"
},
{
"permission": "*",
"action": "deny",
"pattern": "*"
},
{
"permission": "grep",
"action": "allow",
"pattern": "*"
},
{
"permission": "glob",
"action": "allow",
"pattern": "*"
},
{
"permission": "list",
"action": "allow",
"pattern": "*"
},
{
"permission": "bash",
"action": "allow",
"pattern": "*"
},
{
"permission": "webfetch",
"action": "allow",
"pattern": "*"
},
{
"permission": "websearch",
"action": "allow",
"pattern": "*"
},
{
"permission": "codesearch",
"action": "allow",
"pattern": "*"
},
{
"permission": "read",
"action": "allow",
"pattern": "*"
},
{
"permission": "external_directory",
"pattern": "/home/nathan/.local/share/opencode/tool-output/*",
"action": "allow"
},
{
"permission": "external_directory",
"pattern": "/home/nathan/.local/share/opencode/tool-output/*",
"action": "allow"
}
],
"description": "Fast agent specialized for exploring codebases. Use this when you need to quickly find files by patterns (eg. \"src/components/**/*.tsx\"), search code for keywords (eg. \"API endpoints\"), or answer questions about the codebase (eg. \"how do API endpoints work?\"). When calling this agent, specify the desired thoroughness level: \"quick\" for basic searches, \"medium\" for moderate exploration, or \"very thorough\" for comprehensive analysis across multiple locations and naming conventions.",
"prompt": "You are a file search specialist. You excel at thoroughly navigating and exploring codebases.\n\nYour strengths:\n- Rapidly finding files using glob patterns\n- Searching code and text with powerful regex patterns\n- Reading and analyzing file contents\n\nGuidelines:\n- Use Glob for broad file pattern matching\n- Use Grep for searching file contents with regex\n- Use Read when you know the specific file path you need to read\n- Use Bash for file operations like copying, moving, or listing directory contents\n- Adapt your search approach based on the thoroughness level specified by the caller\n- Return file paths as absolute paths in your final response\n- For clear communication, avoid using emojis\n- Do not create any files, or run bash commands that modify the user's system state in any way\n\nComplete the user's search request efficiently and report your findings clearly.\n",
"options": {},
"mode": "subagent",
"native": true
},
{
"name": "compaction",
"mode": "primary",
"native": true,
"hidden": true,
"prompt": "You are a helpful AI assistant tasked with summarizing conversations.\n\nWhen asked to summarize, provide a detailed but concise summary of the conversation. \nFocus on information that would be helpful for continuing the conversation, including:\n- What was done\n- What is currently being worked on\n- Which files are being modified\n- What needs to be done next\n- Key user requests, constraints, or preferences that should persist\n- Important technical decisions and why they were made\n\nYour summary should be comprehensive enough to provide context but concise enough to be quickly understood.\n",
"permission": [
{
"permission": "*",
"action": "allow",
"pattern": "*"
},
{
"permission": "doom_loop",
"action": "ask",
"pattern": "*"
},
{
"permission": "external_directory",
"pattern": "*",
"action": "ask"
},
{
"permission": "external_directory",
"pattern": "/home/nathan/.local/share/opencode/tool-output/*",
"action": "allow"
},
{
"permission": "question",
"action": "deny",
"pattern": "*"
},
{
"permission": "plan_enter",
"action": "deny",
"pattern": "*"
},
{
"permission": "plan_exit",
"action": "deny",
"pattern": "*"
},
{
"permission": "read",
"pattern": "*",
"action": "allow"
},
{
"permission": "read",
"pattern": "*.env",
"action": "ask"
},
{
"permission": "read",
"pattern": "*.env.*",
"action": "ask"
},
{
"permission": "read",
"pattern": "*.env.example",
"action": "allow"
},
{
"permission": "*",
"action": "deny",
"pattern": "*"
},
{
"permission": "external_directory",
"pattern": "/home/nathan/.local/share/opencode/tool-output/*",
"action": "allow"
}
],
"options": {}
},
{
"name": "title",
"mode": "primary",
"options": {},
"native": true,
"hidden": true,
"temperature": 0.5,
"permission": [
{
"permission": "*",
"action": "allow",
"pattern": "*"
},
{
"permission": "doom_loop",
"action": "ask",
"pattern": "*"
},
{
"permission": "external_directory",
"pattern": "*",
"action": "ask"
},
{
"permission": "external_directory",
"pattern": "/home/nathan/.local/share/opencode/tool-output/*",
"action": "allow"
},
{
"permission": "question",
"action": "deny",
"pattern": "*"
},
{
"permission": "plan_enter",
"action": "deny",
"pattern": "*"
},
{
"permission": "plan_exit",
"action": "deny",
"pattern": "*"
},
{
"permission": "read",
"pattern": "*",
"action": "allow"
},
{
"permission": "read",
"pattern": "*.env",
"action": "ask"
},
{
"permission": "read",
"pattern": "*.env.*",
"action": "ask"
},
{
"permission": "read",
"pattern": "*.env.example",
"action": "allow"
},
{
"permission": "*",
"action": "deny",
"pattern": "*"
},
{
"permission": "external_directory",
"pattern": "/home/nathan/.local/share/opencode/tool-output/*",
"action": "allow"
}
],
"prompt": "You are a title generator. You output ONLY a thread title. Nothing else.\n\n<task>\nGenerate a brief title that would help the user find this conversation later.\n\nFollow all rules in <rules>\nUse the <examples> so you know what a good title looks like.\nYour output must be:\n- A single line\n- ≤50 characters\n- No explanations\n</task>\n\n<rules>\n- you MUST use the same language as the user message you are summarizing\n- Title must be grammatically correct and read naturally - no word salad\n- Never include tool names in the title (e.g. \"read tool\", \"bash tool\", \"edit tool\")\n- Focus on the main topic or question the user needs to retrieve\n- Vary your phrasing - avoid repetitive patterns like always starting with \"Analyzing\"\n- When a file is mentioned, focus on WHAT the user wants to do WITH the file, not just that they shared it\n- Keep exact: technical terms, numbers, filenames, HTTP codes\n- Remove: the, this, my, a, an\n- Never assume tech stack\n- Never use tools\n- NEVER respond to questions, just generate a title for the conversation\n- The title should NEVER include \"summarizing\" or \"generating\" when generating a title\n- DO NOT SAY YOU CANNOT GENERATE A TITLE OR COMPLAIN ABOUT THE INPUT\n- Always output something meaningful, even if the input is minimal.\n- If the user message is short or conversational (e.g. \"hello\", \"lol\", \"what's up\", \"hey\"):\n → create a title that reflects the user's tone or intent (such as Greeting, Quick check-in, Light chat, Intro message, etc.)\n</rules>\n\n<examples>\n\"debug 500 errors in production\" → Debugging production 500 errors\n\"refactor user service\" → Refactoring user service\n\"why is app.js failing\" → app.js failure investigation\n\"implement rate limiting\" → Rate limiting implementation\n\"how do I connect postgres to my API\" → Postgres API connection\n\"best practices for React hooks\" → React hooks best practices\n\"@src/auth.ts can you add refresh token support\" → Auth refresh token support\n\"@utils/parser.ts this is broken\" → Parser bug fix\n\"look at @config.json\" → Config review\n\"@App.tsx add dark mode toggle\" → Dark mode toggle in App\n</examples>\n"
},
{
"name": "summary",
"mode": "primary",
"options": {},
"native": true,
"hidden": true,
"permission": [
{
"permission": "*",
"action": "allow",
"pattern": "*"
},
{
"permission": "doom_loop",
"action": "ask",
"pattern": "*"
},
{
"permission": "external_directory",
"pattern": "*",
"action": "ask"
},
{
"permission": "external_directory",
"pattern": "/home/nathan/.local/share/opencode/tool-output/*",
"action": "allow"
},
{
"permission": "question",
"action": "deny",
"pattern": "*"
},
{
"permission": "plan_enter",
"action": "deny",
"pattern": "*"
},
{
"permission": "plan_exit",
"action": "deny",
"pattern": "*"
},
{
"permission": "read",
"pattern": "*",
"action": "allow"
},
{
"permission": "read",
"pattern": "*.env",
"action": "ask"
},
{
"permission": "read",
"pattern": "*.env.*",
"action": "ask"
},
{
"permission": "read",
"pattern": "*.env.example",
"action": "allow"
},
{
"permission": "*",
"action": "deny",
"pattern": "*"
},
{
"permission": "external_directory",
"pattern": "/home/nathan/.local/share/opencode/tool-output/*",
"action": "allow"
}
],
"prompt": "Summarize what was done in this conversation. Write like a pull request description.\n\nRules:\n- 2-3 sentences max\n- Describe the changes made, not the process\n- Do not mention running tests, builds, or other validation steps\n- Do not explain what the user asked for\n- Write in first person (I added..., I fixed...)\n- Never ask questions or add new questions\n- If the conversation ends with an unanswered question to the user, preserve that exact question\n- If the conversation ends with an imperative statement or request to the user (e.g. \"Now please run the command and paste the console output\"), always include that exact request in the summary\n"
}
]

View file

@ -0,0 +1,102 @@
{
"agent": {},
"mode": {},
"plugin": [],
"command": {},
"username": "nathan",
"keybinds": {
"leader": "ctrl+x",
"app_exit": "ctrl+c,ctrl+d,<leader>q",
"editor_open": "<leader>e",
"theme_list": "<leader>t",
"sidebar_toggle": "<leader>b",
"scrollbar_toggle": "none",
"username_toggle": "none",
"status_view": "<leader>s",
"session_export": "<leader>x",
"session_new": "<leader>n",
"session_list": "<leader>l",
"session_timeline": "<leader>g",
"session_fork": "none",
"session_rename": "ctrl+r",
"session_delete": "ctrl+d",
"stash_delete": "ctrl+d",
"model_provider_list": "ctrl+a",
"model_favorite_toggle": "ctrl+f",
"session_share": "none",
"session_unshare": "none",
"session_interrupt": "escape",
"session_compact": "<leader>c",
"messages_page_up": "pageup,ctrl+alt+b",
"messages_page_down": "pagedown,ctrl+alt+f",
"messages_line_up": "ctrl+alt+y",
"messages_line_down": "ctrl+alt+e",
"messages_half_page_up": "ctrl+alt+u",
"messages_half_page_down": "ctrl+alt+d",
"messages_first": "ctrl+g,home",
"messages_last": "ctrl+alt+g,end",
"messages_next": "none",
"messages_previous": "none",
"messages_last_user": "none",
"messages_copy": "<leader>y",
"messages_undo": "<leader>u",
"messages_redo": "<leader>r",
"messages_toggle_conceal": "<leader>h",
"tool_details": "none",
"model_list": "<leader>m",
"model_cycle_recent": "f2",
"model_cycle_recent_reverse": "shift+f2",
"model_cycle_favorite": "none",
"model_cycle_favorite_reverse": "none",
"command_list": "ctrl+p",
"agent_list": "<leader>a",
"agent_cycle": "tab",
"agent_cycle_reverse": "shift+tab",
"variant_cycle": "ctrl+t",
"input_clear": "ctrl+c",
"input_paste": "ctrl+v",
"input_submit": "return",
"input_newline": "shift+return,ctrl+return,alt+return,ctrl+j",
"input_move_left": "left,ctrl+b",
"input_move_right": "right,ctrl+f",
"input_move_up": "up",
"input_move_down": "down",
"input_select_left": "shift+left",
"input_select_right": "shift+right",
"input_select_up": "shift+up",
"input_select_down": "shift+down",
"input_line_home": "ctrl+a",
"input_line_end": "ctrl+e",
"input_select_line_home": "ctrl+shift+a",
"input_select_line_end": "ctrl+shift+e",
"input_visual_line_home": "alt+a",
"input_visual_line_end": "alt+e",
"input_select_visual_line_home": "alt+shift+a",
"input_select_visual_line_end": "alt+shift+e",
"input_buffer_home": "home",
"input_buffer_end": "end",
"input_select_buffer_home": "shift+home",
"input_select_buffer_end": "shift+end",
"input_delete_line": "ctrl+shift+d",
"input_delete_to_line_end": "ctrl+k",
"input_delete_to_line_start": "ctrl+u",
"input_backspace": "backspace,shift+backspace",
"input_delete": "ctrl+d,delete,shift+delete",
"input_undo": "ctrl+-,super+z",
"input_redo": "ctrl+.,super+shift+z",
"input_word_forward": "alt+f,alt+right,ctrl+right",
"input_word_backward": "alt+b,alt+left,ctrl+left",
"input_select_word_forward": "alt+shift+f,alt+shift+right",
"input_select_word_backward": "alt+shift+b,alt+shift+left",
"input_delete_word_forward": "alt+d,alt+delete,ctrl+delete",
"input_delete_word_backward": "ctrl+w,ctrl+backspace,alt+backspace",
"history_previous": "up",
"history_next": "down",
"session_child_cycle": "<leader>right",
"session_child_cycle_reverse": "<leader>left",
"session_parent": "<leader>up",
"terminal_suspend": "ctrl+z",
"terminal_title_toggle": "none",
"tips_toggle": "<leader>h"
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,12 @@
{
"id": "ses_3ce42bdb9ffeEIUUu08AuKTJms",
"slug": "witty-eagle",
"version": "1.1.49",
"projectID": "c4153c5335dc81f0e622888f1f387c4b84dc54d5",
"directory": "/home/nathan/sandbox-agent/research/opencode-compat",
"title": "New session - 2026-02-06T06:56:52.806Z",
"time": {
"created": 1770361012806,
"updated": 1770361012806
}
}

View file

@ -0,0 +1,17 @@
{
"id": "ses_3ce42bdb9ffeEIUUu08AuKTJms",
"slug": "witty-eagle",
"version": "1.1.49",
"projectID": "c4153c5335dc81f0e622888f1f387c4b84dc54d5",
"directory": "/home/nathan/sandbox-agent/research/opencode-compat",
"title": "Hello from OpenCode",
"time": {
"created": 1770361012806,
"updated": 1770361017462
},
"summary": {
"additions": 0,
"deletions": 0,
"files": 0
}
}

View file

@ -0,0 +1,156 @@
[
{
"type": "session.created",
"properties": {
"info": {
"id": "ses_3ce42bdb9ffeEIUUu08AuKTJms",
"slug": "witty-eagle",
"version": "1.1.49",
"projectID": "c4153c5335dc81f0e622888f1f387c4b84dc54d5",
"directory": "/home/nathan/sandbox-agent/research/opencode-compat",
"title": "New session - 2026-02-06T06:56:52.806Z",
"time": {
"created": 1770361012806,
"updated": 1770361012806
}
}
}
},
{
"type": "session.status",
"properties": {
"sessionID": "ses_3ce42bdb9ffeEIUUu08AuKTJms",
"status": {
"type": "busy"
}
}
},
{
"type": "session.status",
"properties": {
"sessionID": "ses_3ce42bdb9ffeEIUUu08AuKTJms",
"status": {
"type": "busy"
}
}
},
{
"type": "session.diff",
"properties": {
"sessionID": "ses_3ce42bdb9ffeEIUUu08AuKTJms",
"diff": []
}
},
{
"type": "session.status",
"properties": {
"sessionID": "ses_3ce42bdb9ffeEIUUu08AuKTJms",
"status": {
"type": "busy"
}
}
},
{
"type": "session.status",
"properties": {
"sessionID": "ses_3ce42bdb9ffeEIUUu08AuKTJms",
"status": {
"type": "idle"
}
}
},
{
"type": "session.idle",
"properties": {
"sessionID": "ses_3ce42bdb9ffeEIUUu08AuKTJms"
}
},
{
"type": "session.diff",
"properties": {
"sessionID": "ses_3ce42bdb9ffeEIUUu08AuKTJms",
"diff": []
}
},
{
"type": "session.status",
"properties": {
"sessionID": "ses_3ce42bdb9ffeEIUUu08AuKTJms",
"status": {
"type": "busy"
}
}
},
{
"type": "session.status",
"properties": {
"sessionID": "ses_3ce42bdb9ffeEIUUu08AuKTJms",
"status": {
"type": "busy"
}
}
},
{
"type": "session.diff",
"properties": {
"sessionID": "ses_3ce42bdb9ffeEIUUu08AuKTJms",
"diff": []
}
},
{
"type": "session.status",
"properties": {
"sessionID": "ses_3ce42bdb9ffeEIUUu08AuKTJms",
"status": {
"type": "busy"
}
}
},
{
"type": "session.status",
"properties": {
"sessionID": "ses_3ce42bdb9ffeEIUUu08AuKTJms",
"status": {
"type": "busy"
}
}
},
{
"type": "session.diff",
"properties": {
"sessionID": "ses_3ce42bdb9ffeEIUUu08AuKTJms",
"diff": []
}
},
{
"type": "session.status",
"properties": {
"sessionID": "ses_3ce42bdb9ffeEIUUu08AuKTJms",
"status": {
"type": "busy"
}
}
},
{
"type": "session.status",
"properties": {
"sessionID": "ses_3ce42bdb9ffeEIUUu08AuKTJms",
"status": {
"type": "idle"
}
}
},
{
"type": "session.idle",
"properties": {
"sessionID": "ses_3ce42bdb9ffeEIUUu08AuKTJms"
}
},
{
"type": "session.diff",
"properties": {
"sessionID": "ses_3ce42bdb9ffeEIUUu08AuKTJms",
"diff": []
}
}
]

View file

@ -0,0 +1 @@
{}

View file

@ -0,0 +1,682 @@
[
{
"properties": {},
"type": "server.connected"
},
{
"properties": {
"branch": "main",
"name": "/home/nathan/sandbox-agent/research/opencode-compat"
},
"type": "worktree.ready"
},
{
"properties": {},
"type": "server.heartbeat"
},
{
"properties": {
"info": {
"directory": "/home/nathan/sandbox-agent/research/opencode-compat",
"id": "ses_1",
"projectID": "proj_1",
"slug": "session-ses_1",
"time": {
"created": 1770362164904,
"updated": 1770362164904
},
"title": "Session ses_1",
"version": "0"
}
},
"type": "session.created"
},
{
"properties": {
"sessionID": "ses_1",
"status": {
"type": "busy"
}
},
"type": "session.status"
},
{
"properties": {
"info": {
"agent": "build",
"id": "msg_1",
"model": {
"modelID": "mock",
"providerID": "sandbox-agent"
},
"role": "user",
"sessionID": "ses_1",
"time": {
"completed": 1770362164907,
"created": 1770362164907
}
},
"sessionID": "ses_1"
},
"type": "message.updated"
},
{
"properties": {
"messageID": "msg_1",
"part": {
"id": "part_1",
"messageID": "msg_1",
"sessionID": "ses_1",
"text": "echo Hello from sandbox-agent",
"type": "text"
},
"sessionID": "ses_1"
},
"type": "message.part.updated"
},
{
"properties": {
"info": {
"agent": "build",
"cost": 0,
"finish": "stop",
"id": "msg_1_assistant",
"mode": "default",
"modelID": "mock",
"parentID": "msg_1",
"path": {
"cwd": "/home/nathan/sandbox-agent/research/opencode-compat",
"root": "/home/nathan/sandbox-agent/research/opencode-compat"
},
"providerID": "sandbox-agent",
"role": "assistant",
"sessionID": "ses_1",
"time": {
"created": 1770362165109
},
"tokens": {
"cache": {
"read": 0,
"write": 0
},
"input": 0,
"output": 0,
"reasoning": 0
}
},
"sessionID": "ses_1"
},
"type": "message.updated"
},
{
"properties": {
"delta": "echo Hello from sandbox-agent",
"messageID": "msg_1_assistant",
"part": {
"id": "msg_1_assistant_text",
"messageID": "msg_1_assistant",
"sessionID": "ses_1",
"text": "echo Hello from sandbox-agent",
"type": "text"
},
"sessionID": "ses_1"
},
"type": "message.part.updated"
},
{
"properties": {
"info": {
"agent": "build",
"cost": 0,
"finish": "stop",
"id": "msg_1_assistant_00000000000000000005",
"mode": "default",
"modelID": "mock",
"parentID": "msg_1",
"path": {
"cwd": "/home/nathan/sandbox-agent/research/opencode-compat",
"root": "/home/nathan/sandbox-agent/research/opencode-compat"
},
"providerID": "sandbox-agent",
"role": "assistant",
"sessionID": "ses_1",
"time": {
"created": 1770362165309
},
"tokens": {
"cache": {
"read": 0,
"write": 0
},
"input": 0,
"output": 0,
"reasoning": 0
}
},
"sessionID": "ses_1"
},
"type": "message.updated"
},
{
"properties": {
"info": {
"agent": "build",
"cost": 0,
"finish": "stop",
"id": "msg_1_assistant_00000000000000000005",
"mode": "default",
"modelID": "mock",
"parentID": "msg_1",
"path": {
"cwd": "/home/nathan/sandbox-agent/research/opencode-compat",
"root": "/home/nathan/sandbox-agent/research/opencode-compat"
},
"providerID": "sandbox-agent",
"role": "assistant",
"sessionID": "ses_1",
"time": {
"created": 1770362165511
},
"tokens": {
"cache": {
"read": 0,
"write": 0
},
"input": 0,
"output": 0,
"reasoning": 0
}
},
"sessionID": "ses_1"
},
"type": "message.updated"
},
{
"properties": {
"delta": "Hello from sandbox-agent",
"messageID": "msg_1_assistant_00000000000000000005",
"part": {
"id": "msg_1_assistant_00000000000000000005_text",
"messageID": "msg_1_assistant_00000000000000000005",
"sessionID": "ses_1",
"text": "Hello from sandbox-agent",
"type": "text"
},
"sessionID": "ses_1"
},
"type": "message.part.updated"
},
{
"properties": {
"info": {
"agent": "build",
"cost": 0,
"finish": "stop",
"id": "msg_1_assistant_00000000000000000005",
"mode": "default",
"modelID": "mock",
"parentID": "msg_1",
"path": {
"cwd": "/home/nathan/sandbox-agent/research/opencode-compat",
"root": "/home/nathan/sandbox-agent/research/opencode-compat"
},
"providerID": "sandbox-agent",
"role": "assistant",
"sessionID": "ses_1",
"time": {
"completed": 1770362165511,
"created": 1770362165511
},
"tokens": {
"cache": {
"read": 0,
"write": 0
},
"input": 0,
"output": 0,
"reasoning": 0
}
},
"sessionID": "ses_1"
},
"type": "message.updated"
},
{
"properties": {
"messageID": "msg_1_assistant_00000000000000000005",
"part": {
"id": "msg_1_assistant_00000000000000000005_text",
"messageID": "msg_1_assistant_00000000000000000005",
"sessionID": "ses_1",
"text": "Hello from sandbox-agent",
"type": "text"
},
"sessionID": "ses_1"
},
"type": "message.part.updated"
},
{
"properties": {
"sessionID": "ses_1",
"status": {
"type": "idle"
}
},
"type": "session.status"
},
{
"properties": {
"sessionID": "ses_1"
},
"type": "session.idle"
},
{
"properties": {
"sessionID": "ses_1",
"status": {
"type": "busy"
}
},
"type": "session.status"
},
{
"properties": {
"info": {
"agent": "build",
"id": "msg_2",
"model": {
"modelID": "mock",
"providerID": "sandbox-agent"
},
"role": "user",
"sessionID": "ses_1",
"time": {
"completed": 1770362166412,
"created": 1770362166412
}
},
"sessionID": "ses_1"
},
"type": "message.updated"
},
{
"properties": {
"messageID": "msg_2",
"part": {
"id": "part_2",
"messageID": "msg_2",
"sessionID": "ses_1",
"text": "tool",
"type": "text"
},
"sessionID": "ses_1"
},
"type": "message.part.updated"
},
{
"properties": {
"info": {
"agent": "build",
"cost": 0,
"finish": "stop",
"id": "msg_2_assistant",
"mode": "default",
"modelID": "mock",
"parentID": "msg_2",
"path": {
"cwd": "/home/nathan/sandbox-agent/research/opencode-compat",
"root": "/home/nathan/sandbox-agent/research/opencode-compat"
},
"providerID": "sandbox-agent",
"role": "assistant",
"sessionID": "ses_1",
"time": {
"created": 1770362166614
},
"tokens": {
"cache": {
"read": 0,
"write": 0
},
"input": 0,
"output": 0,
"reasoning": 0
}
},
"sessionID": "ses_1"
},
"type": "message.updated"
},
{
"properties": {
"delta": "tool",
"messageID": "msg_2_assistant",
"part": {
"id": "msg_2_assistant_text",
"messageID": "msg_2_assistant",
"sessionID": "ses_1",
"text": "tool",
"type": "text"
},
"sessionID": "ses_1"
},
"type": "message.part.updated"
},
{
"properties": {
"info": {
"agent": "build",
"cost": 0,
"finish": "stop",
"id": "msg_2_assistant_00000000000000000011",
"mode": "default",
"modelID": "mock",
"parentID": "msg_2",
"path": {
"cwd": "/home/nathan/sandbox-agent/research/opencode-compat",
"root": "/home/nathan/sandbox-agent/research/opencode-compat"
},
"providerID": "sandbox-agent",
"role": "assistant",
"sessionID": "ses_1",
"time": {
"created": 1770362166815
},
"tokens": {
"cache": {
"read": 0,
"write": 0
},
"input": 0,
"output": 0,
"reasoning": 0
}
},
"sessionID": "ses_1"
},
"type": "message.updated"
},
{
"properties": {
"messageID": "msg_2_assistant_00000000000000000011",
"part": {
"callID": "mock_2_call",
"id": "part_3",
"messageID": "msg_2_assistant_00000000000000000011",
"metadata": {},
"sessionID": "ses_1",
"state": {
"input": {
"query": "example"
},
"raw": "{\"query\":\"example\"}",
"status": "pending"
},
"tool": "mock.search",
"type": "tool"
},
"sessionID": "ses_1"
},
"type": "message.part.updated"
},
{
"properties": {
"info": {
"agent": "build",
"cost": 0,
"finish": "stop",
"id": "msg_2_assistant_00000000000000000011",
"mode": "default",
"modelID": "mock",
"parentID": "msg_2",
"path": {
"cwd": "/home/nathan/sandbox-agent/research/opencode-compat",
"root": "/home/nathan/sandbox-agent/research/opencode-compat"
},
"providerID": "sandbox-agent",
"role": "assistant",
"sessionID": "ses_1",
"time": {
"completed": 1770362167016,
"created": 1770362167016
},
"tokens": {
"cache": {
"read": 0,
"write": 0
},
"input": 0,
"output": 0,
"reasoning": 0
}
},
"sessionID": "ses_1"
},
"type": "message.updated"
},
{
"properties": {
"messageID": "msg_2_assistant_00000000000000000011",
"part": {
"callID": "mock_2_call",
"id": "part_3",
"messageID": "msg_2_assistant_00000000000000000011",
"metadata": {},
"sessionID": "ses_1",
"state": {
"input": {
"query": "example"
},
"status": "running",
"time": {
"start": 1770362167016
}
},
"tool": "mock.search",
"type": "tool"
},
"sessionID": "ses_1"
},
"type": "message.part.updated"
},
{
"properties": {
"info": {
"agent": "build",
"cost": 0,
"finish": "stop",
"id": "msg_2_assistant_00000000000000000011",
"mode": "default",
"modelID": "mock",
"parentID": "msg_2",
"path": {
"cwd": "/home/nathan/sandbox-agent/research/opencode-compat",
"root": "/home/nathan/sandbox-agent/research/opencode-compat"
},
"providerID": "sandbox-agent",
"role": "assistant",
"sessionID": "ses_1",
"time": {
"created": 1770362167218
},
"tokens": {
"cache": {
"read": 0,
"write": 0
},
"input": 0,
"output": 0,
"reasoning": 0
}
},
"sessionID": "ses_1"
},
"type": "message.updated"
},
{
"properties": {
"messageID": "msg_2_assistant_00000000000000000011",
"part": {
"callID": "mock_2_call",
"id": "part_3",
"messageID": "msg_2_assistant_00000000000000000011",
"metadata": {},
"sessionID": "ses_1",
"state": {
"input": {
"query": "example"
},
"status": "running",
"time": {
"start": 1770362167218
}
},
"tool": "mock.search",
"type": "tool"
},
"sessionID": "ses_1"
},
"type": "message.part.updated"
},
{
"properties": {
"info": {
"agent": "build",
"cost": 0,
"finish": "stop",
"id": "msg_2_assistant_00000000000000000011",
"mode": "default",
"modelID": "mock",
"parentID": "msg_2",
"path": {
"cwd": "/home/nathan/sandbox-agent/research/opencode-compat",
"root": "/home/nathan/sandbox-agent/research/opencode-compat"
},
"providerID": "sandbox-agent",
"role": "assistant",
"sessionID": "ses_1",
"time": {
"completed": 1770362167418,
"created": 1770362167418
},
"tokens": {
"cache": {
"read": 0,
"write": 0
},
"input": 0,
"output": 0,
"reasoning": 0
}
},
"sessionID": "ses_1"
},
"type": "message.updated"
},
{
"properties": {
"messageID": "msg_2_assistant_00000000000000000011",
"part": {
"filename": "mock_2/readme.md",
"id": "part_4",
"messageID": "msg_2_assistant_00000000000000000011",
"mime": "text/plain",
"sessionID": "ses_1",
"type": "file",
"url": "file://mock_2/readme.md"
},
"sessionID": "ses_1"
},
"type": "message.part.updated"
},
{
"properties": {
"messageID": "msg_2_assistant_00000000000000000011",
"part": {
"filename": "mock_2/output.txt",
"id": "part_5",
"messageID": "msg_2_assistant_00000000000000000011",
"mime": "text/plain",
"sessionID": "ses_1",
"source": {
"path": "mock_2/output.txt",
"text": {
"end": 13,
"start": 0,
"value": "+mock output\n"
},
"type": "file"
},
"type": "file",
"url": "file://mock_2/output.txt"
},
"sessionID": "ses_1"
},
"type": "message.part.updated"
},
{
"properties": {
"file": "mock_2/output.txt"
},
"type": "file.edited"
},
{
"properties": {
"messageID": "msg_2_assistant_00000000000000000011",
"part": {
"filename": "mock_2/patch.txt",
"id": "part_6",
"messageID": "msg_2_assistant_00000000000000000011",
"mime": "text/x-diff",
"sessionID": "ses_1",
"source": {
"path": "mock_2/patch.txt",
"text": {
"end": 26,
"start": 0,
"value": "@@ -1,1 +1,1 @@\n-old\n+new\n"
},
"type": "file"
},
"type": "file",
"url": "file://mock_2/patch.txt"
},
"sessionID": "ses_1"
},
"type": "message.part.updated"
},
{
"properties": {
"file": "mock_2/patch.txt"
},
"type": "file.edited"
},
{
"properties": {
"messageID": "msg_2_assistant_00000000000000000011",
"part": {
"callID": "mock_2_call",
"id": "part_3",
"messageID": "msg_2_assistant_00000000000000000011",
"metadata": {},
"sessionID": "ses_1",
"state": {
"input": {
"query": "example"
},
"metadata": {},
"output": "mock search results",
"status": "error",
"time": {
"end": 1770362167418,
"start": 1770362167418
}
},
"tool": "mock.search",
"type": "tool"
},
"sessionID": "ses_1"
},
"type": "message.part.updated"
}
]

View file

@ -0,0 +1,106 @@
[
{
"info": {
"agent": "build",
"id": "msg_1",
"model": {
"modelID": "mock",
"providerID": "sandbox-agent"
},
"role": "user",
"sessionID": "ses_1",
"time": {
"completed": 1770362164907,
"created": 1770362164907
}
},
"parts": [
{
"id": "part_1",
"messageID": "msg_1",
"sessionID": "ses_1",
"text": "echo Hello from sandbox-agent",
"type": "text"
}
]
},
{
"info": {
"agent": "build",
"cost": 0,
"finish": "stop",
"id": "msg_1_assistant",
"mode": "default",
"modelID": "mock",
"parentID": "msg_1",
"path": {
"cwd": "/home/nathan/sandbox-agent/research/opencode-compat",
"root": "/home/nathan/sandbox-agent/research/opencode-compat"
},
"providerID": "sandbox-agent",
"role": "assistant",
"sessionID": "ses_1",
"time": {
"created": 1770362165109
},
"tokens": {
"cache": {
"read": 0,
"write": 0
},
"input": 0,
"output": 0,
"reasoning": 0
}
},
"parts": [
{
"id": "msg_1_assistant_text",
"messageID": "msg_1_assistant",
"sessionID": "ses_1",
"text": "echo Hello from sandbox-agent",
"type": "text"
}
]
},
{
"info": {
"agent": "build",
"cost": 0,
"finish": "stop",
"id": "msg_1_assistant_00000000000000000005",
"mode": "default",
"modelID": "mock",
"parentID": "msg_1",
"path": {
"cwd": "/home/nathan/sandbox-agent/research/opencode-compat",
"root": "/home/nathan/sandbox-agent/research/opencode-compat"
},
"providerID": "sandbox-agent",
"role": "assistant",
"sessionID": "ses_1",
"time": {
"completed": 1770362165511,
"created": 1770362165511
},
"tokens": {
"cache": {
"read": 0,
"write": 0
},
"input": 0,
"output": 0,
"reasoning": 0
}
},
"parts": [
{
"id": "msg_1_assistant_00000000000000000005_text",
"messageID": "msg_1_assistant_00000000000000000005",
"sessionID": "ses_1",
"text": "Hello from sandbox-agent",
"type": "text"
}
]
}
]

View file

@ -0,0 +1,269 @@
[
{
"info": {
"agent": "build",
"id": "msg_1",
"model": {
"modelID": "mock",
"providerID": "sandbox-agent"
},
"role": "user",
"sessionID": "ses_1",
"time": {
"completed": 1770362164907,
"created": 1770362164907
}
},
"parts": [
{
"id": "part_1",
"messageID": "msg_1",
"sessionID": "ses_1",
"text": "echo Hello from sandbox-agent",
"type": "text"
}
]
},
{
"info": {
"agent": "build",
"cost": 0,
"finish": "stop",
"id": "msg_1_assistant",
"mode": "default",
"modelID": "mock",
"parentID": "msg_1",
"path": {
"cwd": "/home/nathan/sandbox-agent/research/opencode-compat",
"root": "/home/nathan/sandbox-agent/research/opencode-compat"
},
"providerID": "sandbox-agent",
"role": "assistant",
"sessionID": "ses_1",
"time": {
"created": 1770362165109
},
"tokens": {
"cache": {
"read": 0,
"write": 0
},
"input": 0,
"output": 0,
"reasoning": 0
}
},
"parts": [
{
"id": "msg_1_assistant_text",
"messageID": "msg_1_assistant",
"sessionID": "ses_1",
"text": "echo Hello from sandbox-agent",
"type": "text"
}
]
},
{
"info": {
"agent": "build",
"cost": 0,
"finish": "stop",
"id": "msg_1_assistant_00000000000000000005",
"mode": "default",
"modelID": "mock",
"parentID": "msg_1",
"path": {
"cwd": "/home/nathan/sandbox-agent/research/opencode-compat",
"root": "/home/nathan/sandbox-agent/research/opencode-compat"
},
"providerID": "sandbox-agent",
"role": "assistant",
"sessionID": "ses_1",
"time": {
"completed": 1770362165511,
"created": 1770362165511
},
"tokens": {
"cache": {
"read": 0,
"write": 0
},
"input": 0,
"output": 0,
"reasoning": 0
}
},
"parts": [
{
"id": "msg_1_assistant_00000000000000000005_text",
"messageID": "msg_1_assistant_00000000000000000005",
"sessionID": "ses_1",
"text": "Hello from sandbox-agent",
"type": "text"
}
]
},
{
"info": {
"agent": "build",
"id": "msg_2",
"model": {
"modelID": "mock",
"providerID": "sandbox-agent"
},
"role": "user",
"sessionID": "ses_1",
"time": {
"completed": 1770362166412,
"created": 1770362166412
}
},
"parts": [
{
"id": "part_2",
"messageID": "msg_2",
"sessionID": "ses_1",
"text": "tool",
"type": "text"
}
]
},
{
"info": {
"agent": "build",
"cost": 0,
"finish": "stop",
"id": "msg_2_assistant",
"mode": "default",
"modelID": "mock",
"parentID": "msg_2",
"path": {
"cwd": "/home/nathan/sandbox-agent/research/opencode-compat",
"root": "/home/nathan/sandbox-agent/research/opencode-compat"
},
"providerID": "sandbox-agent",
"role": "assistant",
"sessionID": "ses_1",
"time": {
"created": 1770362166614
},
"tokens": {
"cache": {
"read": 0,
"write": 0
},
"input": 0,
"output": 0,
"reasoning": 0
}
},
"parts": [
{
"id": "msg_2_assistant_text",
"messageID": "msg_2_assistant",
"sessionID": "ses_1",
"text": "tool",
"type": "text"
}
]
},
{
"info": {
"agent": "build",
"cost": 0,
"finish": "stop",
"id": "msg_2_assistant_00000000000000000011",
"mode": "default",
"modelID": "mock",
"parentID": "msg_2",
"path": {
"cwd": "/home/nathan/sandbox-agent/research/opencode-compat",
"root": "/home/nathan/sandbox-agent/research/opencode-compat"
},
"providerID": "sandbox-agent",
"role": "assistant",
"sessionID": "ses_1",
"time": {
"completed": 1770362167418,
"created": 1770362167418
},
"tokens": {
"cache": {
"read": 0,
"write": 0
},
"input": 0,
"output": 0,
"reasoning": 0
}
},
"parts": [
{
"callID": "mock_2_call",
"id": "part_3",
"messageID": "msg_2_assistant_00000000000000000011",
"metadata": {},
"sessionID": "ses_1",
"state": {
"input": {
"query": "example"
},
"metadata": {},
"output": "mock search results",
"status": "error",
"time": {
"end": 1770362167418,
"start": 1770362167418
}
},
"tool": "mock.search",
"type": "tool"
},
{
"filename": "mock_2/readme.md",
"id": "part_4",
"messageID": "msg_2_assistant_00000000000000000011",
"mime": "text/plain",
"sessionID": "ses_1",
"type": "file",
"url": "file://mock_2/readme.md"
},
{
"filename": "mock_2/output.txt",
"id": "part_5",
"messageID": "msg_2_assistant_00000000000000000011",
"mime": "text/plain",
"sessionID": "ses_1",
"source": {
"path": "mock_2/output.txt",
"text": {
"end": 13,
"start": 0,
"value": "+mock output\n"
},
"type": "file"
},
"type": "file",
"url": "file://mock_2/output.txt"
},
{
"filename": "mock_2/patch.txt",
"id": "part_6",
"messageID": "msg_2_assistant_00000000000000000011",
"mime": "text/x-diff",
"sessionID": "ses_1",
"source": {
"path": "mock_2/patch.txt",
"text": {
"end": 26,
"start": 0,
"value": "@@ -1,1 +1,1 @@\n-old\n+new\n"
},
"type": "file"
},
"type": "file",
"url": "file://mock_2/patch.txt"
}
]
}
]

View file

@ -0,0 +1,11 @@
[
{
"description": "Sandbox Agent compatibility layer",
"hidden": false,
"mode": "all",
"name": "Sandbox Agent",
"native": false,
"options": {},
"permission": []
}
]

View file

@ -0,0 +1,12 @@
{
"directory": "/home/nathan/sandbox-agent/research/opencode-compat",
"id": "ses_1",
"projectID": "proj_1",
"slug": "session-ses_1",
"time": {
"created": 1770362164904,
"updated": 1770362164904
},
"title": "Session ses_1",
"version": "0"
}

View file

@ -0,0 +1,12 @@
{
"directory": "/home/nathan/sandbox-agent/research/opencode-compat",
"id": "ses_1",
"projectID": "proj_1",
"slug": "session-ses_1",
"time": {
"created": 1770362164904,
"updated": 1770362164904
},
"title": "Session ses_1",
"version": "0"
}

View file

@ -0,0 +1,655 @@
[
{
"properties": {
"info": {
"directory": "/home/nathan/sandbox-agent/research/opencode-compat",
"id": "ses_1",
"projectID": "proj_1",
"slug": "session-ses_1",
"time": {
"created": 1770362164904,
"updated": 1770362164904
},
"title": "Session ses_1",
"version": "0"
}
},
"type": "session.created"
},
{
"properties": {
"sessionID": "ses_1",
"status": {
"type": "busy"
}
},
"type": "session.status"
},
{
"properties": {
"info": {
"agent": "build",
"id": "msg_1",
"model": {
"modelID": "mock",
"providerID": "sandbox-agent"
},
"role": "user",
"sessionID": "ses_1",
"time": {
"completed": 1770362164907,
"created": 1770362164907
}
},
"sessionID": "ses_1"
},
"type": "message.updated"
},
{
"properties": {
"messageID": "msg_1",
"part": {
"id": "part_1",
"messageID": "msg_1",
"sessionID": "ses_1",
"text": "echo Hello from sandbox-agent",
"type": "text"
},
"sessionID": "ses_1"
},
"type": "message.part.updated"
},
{
"properties": {
"info": {
"agent": "build",
"cost": 0,
"finish": "stop",
"id": "msg_1_assistant",
"mode": "default",
"modelID": "mock",
"parentID": "msg_1",
"path": {
"cwd": "/home/nathan/sandbox-agent/research/opencode-compat",
"root": "/home/nathan/sandbox-agent/research/opencode-compat"
},
"providerID": "sandbox-agent",
"role": "assistant",
"sessionID": "ses_1",
"time": {
"created": 1770362165109
},
"tokens": {
"cache": {
"read": 0,
"write": 0
},
"input": 0,
"output": 0,
"reasoning": 0
}
},
"sessionID": "ses_1"
},
"type": "message.updated"
},
{
"properties": {
"delta": "echo Hello from sandbox-agent",
"messageID": "msg_1_assistant",
"part": {
"id": "msg_1_assistant_text",
"messageID": "msg_1_assistant",
"sessionID": "ses_1",
"text": "echo Hello from sandbox-agent",
"type": "text"
},
"sessionID": "ses_1"
},
"type": "message.part.updated"
},
{
"properties": {
"info": {
"agent": "build",
"cost": 0,
"finish": "stop",
"id": "msg_1_assistant_00000000000000000005",
"mode": "default",
"modelID": "mock",
"parentID": "msg_1",
"path": {
"cwd": "/home/nathan/sandbox-agent/research/opencode-compat",
"root": "/home/nathan/sandbox-agent/research/opencode-compat"
},
"providerID": "sandbox-agent",
"role": "assistant",
"sessionID": "ses_1",
"time": {
"created": 1770362165309
},
"tokens": {
"cache": {
"read": 0,
"write": 0
},
"input": 0,
"output": 0,
"reasoning": 0
}
},
"sessionID": "ses_1"
},
"type": "message.updated"
},
{
"properties": {
"info": {
"agent": "build",
"cost": 0,
"finish": "stop",
"id": "msg_1_assistant_00000000000000000005",
"mode": "default",
"modelID": "mock",
"parentID": "msg_1",
"path": {
"cwd": "/home/nathan/sandbox-agent/research/opencode-compat",
"root": "/home/nathan/sandbox-agent/research/opencode-compat"
},
"providerID": "sandbox-agent",
"role": "assistant",
"sessionID": "ses_1",
"time": {
"created": 1770362165511
},
"tokens": {
"cache": {
"read": 0,
"write": 0
},
"input": 0,
"output": 0,
"reasoning": 0
}
},
"sessionID": "ses_1"
},
"type": "message.updated"
},
{
"properties": {
"delta": "Hello from sandbox-agent",
"messageID": "msg_1_assistant_00000000000000000005",
"part": {
"id": "msg_1_assistant_00000000000000000005_text",
"messageID": "msg_1_assistant_00000000000000000005",
"sessionID": "ses_1",
"text": "Hello from sandbox-agent",
"type": "text"
},
"sessionID": "ses_1"
},
"type": "message.part.updated"
},
{
"properties": {
"info": {
"agent": "build",
"cost": 0,
"finish": "stop",
"id": "msg_1_assistant_00000000000000000005",
"mode": "default",
"modelID": "mock",
"parentID": "msg_1",
"path": {
"cwd": "/home/nathan/sandbox-agent/research/opencode-compat",
"root": "/home/nathan/sandbox-agent/research/opencode-compat"
},
"providerID": "sandbox-agent",
"role": "assistant",
"sessionID": "ses_1",
"time": {
"completed": 1770362165511,
"created": 1770362165511
},
"tokens": {
"cache": {
"read": 0,
"write": 0
},
"input": 0,
"output": 0,
"reasoning": 0
}
},
"sessionID": "ses_1"
},
"type": "message.updated"
},
{
"properties": {
"messageID": "msg_1_assistant_00000000000000000005",
"part": {
"id": "msg_1_assistant_00000000000000000005_text",
"messageID": "msg_1_assistant_00000000000000000005",
"sessionID": "ses_1",
"text": "Hello from sandbox-agent",
"type": "text"
},
"sessionID": "ses_1"
},
"type": "message.part.updated"
},
{
"properties": {
"sessionID": "ses_1",
"status": {
"type": "idle"
}
},
"type": "session.status"
},
{
"properties": {
"sessionID": "ses_1"
},
"type": "session.idle"
},
{
"properties": {
"sessionID": "ses_1",
"status": {
"type": "busy"
}
},
"type": "session.status"
},
{
"properties": {
"info": {
"agent": "build",
"id": "msg_2",
"model": {
"modelID": "mock",
"providerID": "sandbox-agent"
},
"role": "user",
"sessionID": "ses_1",
"time": {
"completed": 1770362166412,
"created": 1770362166412
}
},
"sessionID": "ses_1"
},
"type": "message.updated"
},
{
"properties": {
"messageID": "msg_2",
"part": {
"id": "part_2",
"messageID": "msg_2",
"sessionID": "ses_1",
"text": "tool",
"type": "text"
},
"sessionID": "ses_1"
},
"type": "message.part.updated"
},
{
"properties": {
"info": {
"agent": "build",
"cost": 0,
"finish": "stop",
"id": "msg_2_assistant",
"mode": "default",
"modelID": "mock",
"parentID": "msg_2",
"path": {
"cwd": "/home/nathan/sandbox-agent/research/opencode-compat",
"root": "/home/nathan/sandbox-agent/research/opencode-compat"
},
"providerID": "sandbox-agent",
"role": "assistant",
"sessionID": "ses_1",
"time": {
"created": 1770362166614
},
"tokens": {
"cache": {
"read": 0,
"write": 0
},
"input": 0,
"output": 0,
"reasoning": 0
}
},
"sessionID": "ses_1"
},
"type": "message.updated"
},
{
"properties": {
"delta": "tool",
"messageID": "msg_2_assistant",
"part": {
"id": "msg_2_assistant_text",
"messageID": "msg_2_assistant",
"sessionID": "ses_1",
"text": "tool",
"type": "text"
},
"sessionID": "ses_1"
},
"type": "message.part.updated"
},
{
"properties": {
"info": {
"agent": "build",
"cost": 0,
"finish": "stop",
"id": "msg_2_assistant_00000000000000000011",
"mode": "default",
"modelID": "mock",
"parentID": "msg_2",
"path": {
"cwd": "/home/nathan/sandbox-agent/research/opencode-compat",
"root": "/home/nathan/sandbox-agent/research/opencode-compat"
},
"providerID": "sandbox-agent",
"role": "assistant",
"sessionID": "ses_1",
"time": {
"created": 1770362166815
},
"tokens": {
"cache": {
"read": 0,
"write": 0
},
"input": 0,
"output": 0,
"reasoning": 0
}
},
"sessionID": "ses_1"
},
"type": "message.updated"
},
{
"properties": {
"messageID": "msg_2_assistant_00000000000000000011",
"part": {
"callID": "mock_2_call",
"id": "part_3",
"messageID": "msg_2_assistant_00000000000000000011",
"metadata": {},
"sessionID": "ses_1",
"state": {
"input": {
"query": "example"
},
"raw": "{\"query\":\"example\"}",
"status": "pending"
},
"tool": "mock.search",
"type": "tool"
},
"sessionID": "ses_1"
},
"type": "message.part.updated"
},
{
"properties": {
"info": {
"agent": "build",
"cost": 0,
"finish": "stop",
"id": "msg_2_assistant_00000000000000000011",
"mode": "default",
"modelID": "mock",
"parentID": "msg_2",
"path": {
"cwd": "/home/nathan/sandbox-agent/research/opencode-compat",
"root": "/home/nathan/sandbox-agent/research/opencode-compat"
},
"providerID": "sandbox-agent",
"role": "assistant",
"sessionID": "ses_1",
"time": {
"completed": 1770362167016,
"created": 1770362167016
},
"tokens": {
"cache": {
"read": 0,
"write": 0
},
"input": 0,
"output": 0,
"reasoning": 0
}
},
"sessionID": "ses_1"
},
"type": "message.updated"
},
{
"properties": {
"messageID": "msg_2_assistant_00000000000000000011",
"part": {
"callID": "mock_2_call",
"id": "part_3",
"messageID": "msg_2_assistant_00000000000000000011",
"metadata": {},
"sessionID": "ses_1",
"state": {
"input": {
"query": "example"
},
"status": "running",
"time": {
"start": 1770362167016
}
},
"tool": "mock.search",
"type": "tool"
},
"sessionID": "ses_1"
},
"type": "message.part.updated"
},
{
"properties": {
"info": {
"agent": "build",
"cost": 0,
"finish": "stop",
"id": "msg_2_assistant_00000000000000000011",
"mode": "default",
"modelID": "mock",
"parentID": "msg_2",
"path": {
"cwd": "/home/nathan/sandbox-agent/research/opencode-compat",
"root": "/home/nathan/sandbox-agent/research/opencode-compat"
},
"providerID": "sandbox-agent",
"role": "assistant",
"sessionID": "ses_1",
"time": {
"created": 1770362167218
},
"tokens": {
"cache": {
"read": 0,
"write": 0
},
"input": 0,
"output": 0,
"reasoning": 0
}
},
"sessionID": "ses_1"
},
"type": "message.updated"
},
{
"properties": {
"messageID": "msg_2_assistant_00000000000000000011",
"part": {
"callID": "mock_2_call",
"id": "part_3",
"messageID": "msg_2_assistant_00000000000000000011",
"metadata": {},
"sessionID": "ses_1",
"state": {
"input": {
"query": "example"
},
"status": "running",
"time": {
"start": 1770362167218
}
},
"tool": "mock.search",
"type": "tool"
},
"sessionID": "ses_1"
},
"type": "message.part.updated"
},
{
"properties": {
"info": {
"agent": "build",
"cost": 0,
"finish": "stop",
"id": "msg_2_assistant_00000000000000000011",
"mode": "default",
"modelID": "mock",
"parentID": "msg_2",
"path": {
"cwd": "/home/nathan/sandbox-agent/research/opencode-compat",
"root": "/home/nathan/sandbox-agent/research/opencode-compat"
},
"providerID": "sandbox-agent",
"role": "assistant",
"sessionID": "ses_1",
"time": {
"completed": 1770362167418,
"created": 1770362167418
},
"tokens": {
"cache": {
"read": 0,
"write": 0
},
"input": 0,
"output": 0,
"reasoning": 0
}
},
"sessionID": "ses_1"
},
"type": "message.updated"
},
{
"properties": {
"messageID": "msg_2_assistant_00000000000000000011",
"part": {
"filename": "mock_2/readme.md",
"id": "part_4",
"messageID": "msg_2_assistant_00000000000000000011",
"mime": "text/plain",
"sessionID": "ses_1",
"type": "file",
"url": "file://mock_2/readme.md"
},
"sessionID": "ses_1"
},
"type": "message.part.updated"
},
{
"properties": {
"messageID": "msg_2_assistant_00000000000000000011",
"part": {
"filename": "mock_2/output.txt",
"id": "part_5",
"messageID": "msg_2_assistant_00000000000000000011",
"mime": "text/plain",
"sessionID": "ses_1",
"source": {
"path": "mock_2/output.txt",
"text": {
"end": 13,
"start": 0,
"value": "+mock output\n"
},
"type": "file"
},
"type": "file",
"url": "file://mock_2/output.txt"
},
"sessionID": "ses_1"
},
"type": "message.part.updated"
},
{
"properties": {
"messageID": "msg_2_assistant_00000000000000000011",
"part": {
"filename": "mock_2/patch.txt",
"id": "part_6",
"messageID": "msg_2_assistant_00000000000000000011",
"mime": "text/x-diff",
"sessionID": "ses_1",
"source": {
"path": "mock_2/patch.txt",
"text": {
"end": 26,
"start": 0,
"value": "@@ -1,1 +1,1 @@\n-old\n+new\n"
},
"type": "file"
},
"type": "file",
"url": "file://mock_2/patch.txt"
},
"sessionID": "ses_1"
},
"type": "message.part.updated"
},
{
"properties": {
"messageID": "msg_2_assistant_00000000000000000011",
"part": {
"callID": "mock_2_call",
"id": "part_3",
"messageID": "msg_2_assistant_00000000000000000011",
"metadata": {},
"sessionID": "ses_1",
"state": {
"input": {
"query": "example"
},
"metadata": {},
"output": "mock search results",
"status": "error",
"time": {
"end": 1770362167418,
"start": 1770362167418
}
},
"tool": "mock.search",
"type": "tool"
},
"sessionID": "ses_1"
},
"type": "message.part.updated"
}
]

View file

@ -0,0 +1,5 @@
{
"ses_1": {
"type": "idle"
}
}