xonecas.io
64875
Mc

mini-coder / commit add22d1

chore: docs

xonecas2026-03-14 add22d16ea4807a7fea290a42cb3358854d37277 parent 0a17287

2 files changed

TODO.md+81−0
@@ -6,6 +6,87 @@
66 - Review our markdown renderer. Let's make it render the raw markdown, but syntax highlited
77 - add a spinner state showing the user when the undo snapshotting is happening
88 - Structuted output when a skill is auto loaded for the agent
9+- Kimi-k2.5 and other models that use the same sdk hang for long periods during turns.
10+- Kimi-k2.5, GLM-5 and other models that use the same sdk produce these errors:
11+
12+Error 1:
13+
14+```
15+"{\"error\":{\"object\":\"error\",\"type\":\"invalid_request_error\",\"code\":\"invalid_request_error\",\"message\":\"Invalid tool call in messages: tool_calls[].function.arguments for function 'read' must decode to a JSON object, got str\"}}",
16+```
17+
18+Error 2:
19+
20+```
21+2543 | text: responseBody,
22+2544 | schema: errorSchema
23+2545 | });
24+2546 | return {
25+2547 | responseHeaders,
26+2548 | value: new APICallError4({
27+ ^
28+AI_APICallError: Expected dict in tool call arguments, got <class 'str'>
29+ cause: undefined,
30+ url: "https://opencode.ai/zen/v1/chat/completions",
31+ requestBodyValues: {
32+ model: "glm-5",
33+ user: undefined,
34+ max_tokens: undefined,
35+ temperature: undefined,
36+ top_p: undefined,
37+ frequency_penalty: undefined,
38+ presence_penalty: undefined,
39+ response_format: undefined,
40+ stop: undefined,
41+ seed: undefined,
42+ reasoning_effort: undefined,
43+ verbosity: undefined,
44+ messages: [
45+ [Object ...], [Object ...], [Object ...], [Object ...], [Object ...], [Object ...], [Object ...], [Object ...], [Object ...], [Object ...], [Object ...], [Object ...], [Object ...], [Object ...], [Object ...], [Object ...], [Object ...], [Object ...], [Object ...], [Object ...], [Object ...], [Object ...], [Object ...], [Object ...], [Object ...], [Object ...], [Object ...], [Object ...], [Object ...], [Object ...], [Object ...], [Object ...], [Object ...], [Object ...], [Object ...], [Objec …
46+ ],
47+ tools: [
48+ [Object ...], [Object ...], [Object ...], [Object ...], [Object ...], [Object ...], [Object ...], [Object ...], [Object ...], [Object ...]
49+ ],
50+ tool_choice: "auto",
51+ stream: true,
52+ stream_options: undefined,
53+},
54+ statusCode: 400,
55+ responseHeaders: {
56+ "cf-ray": "9dc2e9f38ed09063-BOS",
57+ connection: "keep-alive",
58+ "content-type": "application/json",
59+ date: "Sat, 14 Mar 2026 11:24:46 GMT",
60+ server: "cloudflare",
61+ "transfer-encoding": "chunked",
62+},
63+ responseBody: "{\n\t\"error\": {\n\t\t\"code\": 400,\n\t\t\"message\": \"Expected dict in tool call arguments, got \\u003cclass 'str'\\u003e\",\n\t\t\"type\": \"Bad Request\"\n\t}\n}\n",
64+ isRetryable: false,
65+ data: {
66+ error: [Object ...],
67+},
68+ vercel.ai.error: true,
69+ vercel.ai.error.AI_APICallError: true,
70+
71+ at /home/xonecas/src/mini-coder/node_modules/@ai-sdk/provider-utils/dist/index.mjs:2548:18
72+ at /home/xonecas/src/mini-coder/node_modules/@ai-sdk/provider-utils/dist/index.mjs:2391:34
73+ at processTicksAndRejections (native:7:39)
74+
75+✖ API error 400
76+ https://opencode.ai/zen/v1/chat/completions
77+```
78+
79+- Investigate db lock issues with spawning parallel subagents:
80+
81+```
82+ ⇢ — Audit scope: CLI/input/output/command behavior against mi…
83+ ⇢ — Audit scope: tools/core/session/provider/MCP behavior aga…
84+ ⇢ — Audit scope: repository docs and user-facing documentatio…
85+ ✖ Subagent subprocess produced no output (exit code 7) (diagnostics: 60 | cleanup(); | 61 | t)
86+ ✖ Subagent subprocess produced no output (exit code 7) (diagnostics: 60 | cleanup(); | 61 | t)
87+ ⇢ subagent done (882751in / 10514out tokens)
88+◆ Subagent parallelism hit a SQLite lock in the shared app DB, so I’m finishing the audit with direct reads and a smaller follow-up pass grounded in file references.
89+```
990
1091 ---
1192
mini-coder-idea.md+14−10
@@ -4,17 +4,20 @@ A coding agent via a augmented shell prompt, small and fast that doesn't get in
44
55 ## Inpirations:
66
7-- Oh my pi: https://github.com/can1357/oh-my-pi amazing tool, like a swiss army knife of coding agents.
7+- Pi agent: https://github.com/badlogic/pi-mono/tree/main/packages/coding-agent amazing tool, like a swiss army knife of coding agents.
88 - Claude Code: https://claude.com/product/claude-code clean UI, propertary software
99 - Codex: https://github.com/openai/codex Powerful and open source, focused on heavy open-ai integration
1010 - Opencode: https://opencode.ai/ The open source standard. Similar to oh-my-pi but with a different aesthetic
1111
12+We want to do our best to support their configs, try to find the common api and auto load them along with the community .agents conventions.
13+
1214 ## Philosophy:
1315
16+**Fast and performant**, instant feedback shell like output. Performance first style second.
17+
1418 Very focused on dev flow, simple setup steps and fast to coding.
1519 Elegant output that focus on the conversation with the agent and their actions. Ensure an accurate cronological conversation log that is very readable for the user. Keep a visible hierchy of actions -> results and assistant reasoning and responses.
16-Accurate and reliable core set of features.
17-Fast and performant, instant feedback shell like output. Performance first style second.
20+Accurate and reliable and fast core set of features.
1821 Community oriented, all of the inspirations have their own dotfile format, try to follow the existing
1922 conventions and not introduce more specs. (`.agents` / `AGENTS.md`, while also supporting adjacent conventions like `.claude`)
2023
@@ -22,16 +25,17 @@ conventions and not introduce more specs. (`.agents` / `AGENTS.md`, while also s
2225
2326 - Auto discovery of providers via ENV (Example: OPENCODE_API_KEY), or local servers (Example: ollama)
2427 - Session management and command to create new/resume/list with local sqlite file.
25-- Multi-line prompt, shift enter adds a newline. Enter sends.
28+- Multi-line prompt, shift enter adds a newline. Enter sends. Rich line editing/history/image paste
2629 - Seamless shell integration with `!` in prompt input.
27-- Reference files and skills from the working directory and global configs with `@` in prompt input, plus autocomplete for files, skills, and agents.
30+- Reference files and skills from the working directory and global configs with `@` in prompt input, plus autocomplete for files, skills, to include in the prompt.
2831 - Press `ESC` at any point during an assistant response to interrupt it: the partial response is preserved in history with an interrupt stub appended (so the LLM retains context), and the user is returned to the prompt silently. `ctrl+c` exits forcefully. `ctrl+d` (EOF) gracefully exits.
2932 - Elegantly handles hitting max context size for the model. Also handles max tool calls, gracefully finishing the turn with an update from the agent
33+- Support prompt caching via the used sdks.
3034 - Feature parity with community configs like custom agents, skill and commands.
31-- `read`, `replace`,`insert`, `create`, `shell`, and `subagent` tools for LLMs
35+- `read`, `replace`,`insert`, `create`, `shell`, and `subagent` tools for LLMs. It's imperitive that these are easy to use and actually reduce the friction during these tasks for the LLMs
3236 - read/write tools are streamlined, easy to use and rely on hashline editting pattern.
3337 - Optional `webSearch` and `webContent` tools when `EXA_API_KEY` is set.
34-- `subagent` tool spawns a fresh `mc` subprocess — full capability parity with the main agent, support for recursive subagents (up to 10 levels). Custom agents and custom commands from `.agents` and `.claude` are supported in subagents.
38+- `subagent` tool spawns a fresh `mc` subprocess in one shot mode.
3539 - tool hooks support for supported built-in tools
3640 - Commands in CLI prompt:
3741 - `/model` command allows the user to pick a model from connected providers. As well as thinking effort for the model if supported. Selection persists accross sessions.
@@ -64,12 +68,12 @@ conventions and not introduce more specs. (`.agents` / `AGENTS.md`, while also s
6468 - All things Bun.js, runtime, package manager. https://bun.com/docs
6569 - Multiprovider support via https://ai-sdk.dev/docs/introduction
6670 - Colored output with https://github.com/sindresorhus/yoctocolors limitted but fast!
67-- Markdow rendering support without sacrificing speed and performance
71+- Markdow rendering support **without sacrificing speed and performance**
6872
6973 ## Repo structure
7074
71-Clean separation of concerns, use modules to organize the app.
72-No mocked/offline-servers type of tests
75+Clean separation of concerns, use modules to organize the app. Group logical features together for best browsability and readability of the code.
76+No mocked/offline-servers type of tests. Focused tests on _our_ logic. Do not test our dependencies.
7377
7478 Core modules: