Add CLI, TUI, and multi-channel architecture to 0xKobold agent (Bun/TypeScript)
Session from 0xKobolds on Hugging Face by moikapy · MIT · condensed by Coders Talk
Turn the 0xKobold project into a linkable CLI with a TUI, then progressively add local/global workspace modes, persona/onboarding templates, task/session management, MCP and web-search extensions, and finally fix the resulting TypeScript build errors.
- +0Prompt · +0Asked how to deploy the CLI to NPM, then said they wanted to use `bun link` to test it locally instead
- +4mAgent did · +4mFixed package.json bin path to point at the TS entry (Bun runs TS directly, no tsc needed) and got `bun link` working so the 0xkobold CLI ran globally
- +8mAgent did · +8mAdded a `tui` command, then iteratively reworked it to launch the real TUI entry point, respect the invoking directory, and add a `--local` vs global `~/.0xkobold` workspace switch
- +53mIntervention · +53mDeveloper found the agent had been writing files into the 0xKobolds repo itself instead of the resume-optimizer project despite --local being usedWhy: even though I used --local when creating the project, you started programming in this directory instead of that folder — I need you to explicitly work in the target repo when --local is set
- +1h 7mAgent did · +1h 7mBuilt out OpenClaw-inspired persona/identity templates (IDENTITY.md, USER.md, SOUL.md, AGENT.md, MEMORY.md, BOOT.md etc.), a persona-loader extension, a persona CLI, and an onboarding extension
- +1h 45mAgent did · +1h 45mBuilt session isolation, a kanban-style task manager, an MCP extension, and an Ollama-based web search/fetch extension, wiring them all into pi-config and index.ts
- +2h 22mFail · +2h 22m`bun run build` failed with a wave of TypeScript parser errors (malformed template literals, quote mismatches) across several newly-added extensions; agent spent many turns manually bisecting files to find broken lines
- +2h 35mIntervention · +2h 35mDeveloper pointed out the gateway_broadcast subagent spawning shown in the plan-mode output was itself broken ("Broadcasted event undefined to 0 clients")Why: add to the list that the gateway broadcast is borked — it's spawning nothing and skipping queued messages, that needs fixing too
- +2h 40mFail · +2h 40mAsked to use real subagents to fix the remaining ~250 TypeScript errors, but gateway_broadcast still returned 0 clients; agent fell back to scripted find/replace fixes across files and the build still had unresolved TS2345/TS2339 errors at session end
- +2h 42mOutcome · +2h 42mSession ended mid-fix: parser errors resolved and ~15 commits made across the feature work, but `bun run build` still reported dozens of TypeScript type errors (TS2339, TS2345, TS2322 etc.) unfixed, and subagent-based fixing via gateway_broadcast never worked
Next time I'd scope the session tighter instead of stacking CLI linking, TUI modes, personas, task/session managers, MCP, and web search all in one sitting — the build error cleanup at the end became its own multi-hour slog because of it. The correction that actually mattered was catching that --local wasn't isolating the agent's working directory; without that intervention the whole local-workspace feature would have been silently broken. The subagent/gateway_broadcast approach to parallelizing the TypeScript fixes never worked (0 clients every time), so I'd just tell it up front to fix errors directly rather than pretend to spawn subagents.