You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Tech debt]: Harness and context management is absolute garbage #394
Application context management is very poor. It constantly forcing model to put code in to app.jsx file even when specifically stated to use separate files to save on context size.
Where is option to clean context? Where is option to start fresh feature iteration?
Model constantly rewrites already existing design parts which not related to current changes.
Tools exposed to the model also not enough for good prototyping.
You absolutely should change system prompts, add possibility to atleast clean context and JUST COPY EXISTING HARNESSES TOOLS. I don't understand why the heck you not using opencode/hermes/pi already existing harness.
For now it's just easier and much more productive to have opencode and chrome instead of this app.
Why it matters
Because even GPT5.5 shit it's pants with such bad context management and harness.
I tried both GPT5.5 and local Qwen3.6-27B. Qwen is unusable in this environment. While using it in opencode is absolutely fine.
Proposed approach
You can start with separate sessions with clean context, editable system prompts (to encourage model to have separated components instead of shitting in one file) for user configuration.
You absolutely should remove "app.jsx at first for everything as design direction" because models have different context size and they perform differently based on fullfilment of their context. As soon as you fill 60-80k tokens context even on frontier models you have performance drop. So this approach has 0 sense and harming performance especially for big projects.
Thanks for the detailed report and for caring deeply about the design tool experience. You're raising important points about context management, the App.jsx single-file default, and the tool surface for design prototyping.
Current architecture relevant to your concerns
Default source file: In v0.2, the workspace starts with App.jsx as the entry point (per AGENTS.md). The idea is that the agent edits App.jsx and can split components later, but there's no built-in UI to force the agent into a multi-file structure from the start. The scaffold tool (packages/core/src/tools/scaffold.ts) can copy curated starter templates, but they aren't user-configurable.
Context / session management: Each design is a pi session (JSONL history). There's currently no "clean context" or "start fresh" button in the UI — the session persists across conversations. That's a known gap and is part of why this issue is labeled tech-debt.
Tool surface: The v0.2 agent tools are pi's seven built-ins plus a handful of design-specific tools (ask, scaffold, skill, preview, gen_image, tweaks, todos, done). The user-facing permissions and tool catalog are richer than v0.1 but still evolving.
Harness reuse: The project uses @mariozechner/pi-coding-agent (v0.72.1) as the core agent harness. It already provides read, write, edit, bash, grep, find, ls — the same primitives opencode/hermes use. The design-specific tools are layered on top. So the harness is shared; the complaint is that the design layers aren't polished enough.
What we're doing about it
This issue is already correctly labeled tech-debt and triage. The maintainers are aware that:
Context management (session clear, fresh start) needs a UI.
Editable system prompts for user customization are a requested feature.
The App.jsx focus vs. multi-file output is a recurring tension — the architecture direction (v0.2 DESIGN.md design systems, workspace files) should eventually support cleaner separation, but it's not there yet.
For now
If you haven't already, you can manually delete the workspace folder (.codesign/ in the design directory) between sessions to force a clean start — but that's obviously not a productized solution.
What would help us most
Which model/provider are you using? (you mentioned GPT-5.5 and Qwen3.6-27B — any specific provider/wire?) Different models respond differently to the same prompt.
A concrete example where the model insisted on App.jsx despite an instruction to use separate files — the exact prompt you used and the output would help us reproduce.
Which tools do you feel are missing for good prototyping? (e.g., a dedicated component explorer, live CSS editing, image asset management)
Thanks again for taking the time to write this up. The team is actively working on v0.2 agentic features and your points directly inform the roadmap.
Activity
github-actions commentedon Jun 25, 2026
Thanks for the detailed report and for caring deeply about the design tool experience. You're raising important points about context management, the
App.jsxsingle-file default, and the tool surface for design prototyping.Current architecture relevant to your concerns
App.jsxas the entry point (perAGENTS.md). The idea is that the agent editsApp.jsxand can split components later, but there's no built-in UI to force the agent into a multi-file structure from the start. Thescaffoldtool (packages/core/src/tools/scaffold.ts) can copy curated starter templates, but they aren't user-configurable.tech-debt.ask,scaffold,skill,preview,gen_image,tweaks,todos,done). The user-facing permissions and tool catalog are richer than v0.1 but still evolving.@mariozechner/pi-coding-agent(v0.72.1) as the core agent harness. It already providesread,write,edit,bash,grep,find,ls— the same primitives opencode/hermes use. The design-specific tools are layered on top. So the harness is shared; the complaint is that the design layers aren't polished enough.What we're doing about it
This issue is already correctly labeled
tech-debtandtriage. The maintainers are aware that:App.jsxfocus vs. multi-file output is a recurring tension — the architecture direction (v0.2DESIGN.mddesign systems, workspace files) should eventually support cleaner separation, but it's not there yet.For now
If you haven't already, you can manually delete the workspace folder (
.codesign/in the design directory) between sessions to force a clean start — but that's obviously not a productized solution.What would help us most
App.jsxdespite an instruction to use separate files — the exact prompt you used and the output would help us reproduce.Thanks again for taking the time to write this up. The team is actively working on v0.2 agentic features and your points directly inform the roadmap.
Open-CoDesign Bot
feat(core): use each model's real context window (#476)
feat(core): fit each run into the model's context window (#478)