← Back to Kontasks
Fixed: Malformed Prompt in Console History
Console history now properly strips turn-context before displaying prompts
Output
Fixed: Malformed Prompt Display
✅ BUG FIXED
Console history now properly displays user prompts instead of raw flow metadata
🐛 THE PROBLEM
History was showing:
> " (bugfix) - flow_01KEHD5K35X31QDQVVZDCZVMK8: "investigate flows tool not...
This is the <turn-context> tag content, not the actual prompt
🔧 THE FIX
The inline prompt extraction wasn't stripping turn-context tags:
// BEFORE (lines 116-125) - duplicated logic, missing turn-context strip let origPrompt = kontext.prompt; const beforeInstructions = origPrompt.split('---')[0]; const match = beforeInstructions.match(/DASHBOARD.../) // ...10 more lines of duplicate code
// AFTER - use sanitizePrompt helper (which strips turn-context) const origPrompt = sanitizePrompt(kontext.prompt); promptText.textContent = '> ' + origPrompt;
📝 COMMIT
68f37a15 Turn: Fix malformed prompt in console history 1 file changed, 3 insertions(+), 13 deletions(-)
⚠️ Requires konui restart to take effect
File: konui/src/console-history.ts:114-116
Quick Actions
Original Request
No layout configured
Details
Type
General
Status
Completed
Scope
vibetools
Tags
turn-fidelityconsole-historybugfix
Created
10 Jan 2026, 8:52 am
Updated
10 Jan 2026, 8:52 am
Timing
⏱️ 73.3s
0 tools
● TTFE 0%
● Thinking 100%
● Tools 0%
Created By
claude
📋 Claude's Context
Session
ses_df705a8d...
Raw Data
{
"id": "f436e895-6c5a-4a4a-b4f9-d7e88d5f9a58",
"type": "general",
"status": "completed",
"title": "Fixed: Malformed Prompt in Console History",
"description": "Console history now properly strips turn-context before displaying prompts",
"context": {
"output": "<div style=\"background:#1e1e1e;color:#e0e0e0;padding:20px;border-radius:8px;font-family:'Consolas','Monaco',monospace;\">\n<h2 style=\"font-family:sans-serif;color:#fff;margin:0 0 16px 0;\">Fixed: Malformed Prompt Display</h2>\n\n<div style=\"background:#2d3d2d;padding:16px;border-radius:6px;margin-bottom:20px;border-left:4px solid #98c379;\">\n<h3 style=\"color:#98c379;margin:0 0 8px 0;font-size:14px;\">✅ BUG FIXED</h3>\n<p style=\"margin:0;color:#e0e0e0;\">Console history now properly displays user prompts instead of raw flow metadata</p>\n</div>\n\n<h3 style=\"color:#c678dd;margin:20px 0 12px 0;font-size:14px;\">🐛 THE PROBLEM</h3>\n<div style=\"background:#3d2d2d;padding:12px;border-radius:6px;margin-bottom:16px;border-left:4px solid #e06c75;\">\n<p style=\"margin:0 0 8px 0;color:#e06c75;font-size:12px;\">History was showing:</p>\n<pre style=\"background:#2d2d2d;padding:8px;border-radius:4px;margin:0;font-size:11px;overflow-x:auto;color:#7f848e;\">> \" (bugfix)\n - flow_01KEHD5K35X31QDQVVZDCZVMK8: \"investigate flows tool not...</pre>\n<p style=\"margin:8px 0 0 0;color:#7f848e;font-size:11px;\">This is the <code><turn-context></code> tag content, not the actual prompt</p>\n</div>\n\n<h3 style=\"color:#c678dd;margin:20px 0 12px 0;font-size:14px;\">🔧 THE FIX</h3>\n<div style=\"background:#2d2d2d;padding:12px;border-radius:6px;margin-bottom:16px;\">\n<p style=\"margin:0 0 8px 0;color:#7f848e;font-size:12px;\">The inline prompt extraction wasn't stripping turn-context tags:</p>\n<pre style=\"background:#252525;padding:8px;border-radius:4px;margin:0 0 12px 0;font-size:11px;overflow-x:auto;\"><span style=\"color:#e06c75;\">// BEFORE (lines 116-125) - duplicated logic, missing turn-context strip</span>\n<span style=\"color:#7f848e;\">let origPrompt = kontext.prompt;</span>\n<span style=\"color:#7f848e;\">const beforeInstructions = origPrompt.split('---')[0];</span>\n<span style=\"color:#7f848e;\">const match = beforeInstructions.match(/DASHBOARD.../)</span>\n<span style=\"color:#7f848e;\">// ...10 more lines of duplicate code</span></pre>\n\n<pre style=\"background:#252525;padding:8px;border-radius:4px;margin:0;font-size:11px;overflow-x:auto;\"><span style=\"color:#98c379;\">// AFTER - use sanitizePrompt helper (which strips turn-context)</span>\n<span style=\"color:#61afef;\">const origPrompt = sanitizePrompt(kontext.prompt);</span>\n<span style=\"color:#61afef;\">promptText.textContent = '> ' + origPrompt;</span></pre>\n</div>\n\n<h3 style=\"color:#c678dd;margin:20px 0 12px 0;font-size:14px;\">📝 COMMIT</h3>\n<pre style=\"background:#2d2d2d;padding:12px;border-radius:6px;margin:0;font-size:11px;color:#e0e0e0;\">\n<span style=\"color:#98c379;\">68f37a15</span> Turn: Fix malformed prompt in console history\n<span style=\"color:#7f848e;\">1 file changed, 3 insertions(+), 13 deletions(-)</span>\n</pre>\n\n<div style=\"background:#2d2d2d;padding:12px;border-radius:6px;margin:20px 0;\">\n<p style=\"margin:0;color:#e5c07b;font-size:12px;\">⚠️ <strong>Requires konui restart</strong> to take effect</p>\n</div>\n\n<p style=\"color:#7f848e;margin:20px 0 0 0;font-size:11px;\">File: konui/src/console-history.ts:114-116</p>\n</div>",
"requestedAt": "2026-01-10T09:48:00.000Z",
"requestId": "a4c5531e-16f8-485a-ae85-99952d0608f8",
"choices": [
{
"label": "Restart konui",
"value": "Restart konui to apply the console history fix",
"primary": true
},
{
"label": "Test first",
"value": "Let me test the fix in a new session first before restarting",
"primary": false
}
],
"turnTiming": {
"totalMs": 73277,
"ttfeMs": 39,
"thinkingMs": 73238,
"toolExecutionMs": 0,
"toolCallCount": 0,
"thinkingPct": 100,
"toolsPct": 0,
"ttfePct": 0
}
},
"createdBy": "claude",
"createdAt": "2026-01-09T22:52:09.379Z",
"updatedAt": "2026-01-09T22:52:14.268Z",
"requestId": "a4c5531e-16f8-485a-ae85-99952d0608f8",
"scope": "vibetools",
"tags": [
"turn-fidelity",
"console-history",
"bugfix"
],
"sessionId": "ses_df705a8d-ea1",
"flowId": "flow_01KEHQ5A7ZX7YDB8KG1NP2GE68",
"flowLinks": [
{
"flowId": "flow_01KEHQ5A7ZX7YDB8KG1NP2GE68",
"edgeType": "evidence",
"createdAt": "2026-01-09T22:52:09.379Z"
}
]
}