← Back to Kontasks
Turn: Implemented konui_get_recent_kontasks
New MCP tool for context recovery at turn start
Output
✅ konui_get_recent_kontasks Implemented
✓ Committed: e9a457bf
konui/mcp/server.ts, CLAUDE.md
📋 New Tool Spec
konui_get_recent_kontasks(count: 1-5, scope?: string, includeOutput?: bool) Returns: { "kontasks": [ { "id": "abc123...", "title": "Turn: Fix notification badge", "status": "completed", "scope": "vibetools", "tags": ["ui"], "summary": "Fixed badge to show unread count...", "filesChanged": ["konui/src/views/layout.ts"], "commitSha": "4593ff7b" } ] }
📊 Token Efficiency
| Approach | Tokens/3 kontasks |
|---|---|
| konui_get_task × 3 (full HTML) | ~3000-6000 |
| konui_list_tasks (metadata) | ~450 |
| konui_get_recent_kontasks (new) | ~300-450 |
🔧 Features Implemented
- Summary extraction - Parses HTML output for meaningful text, skips JSON/code blocks
- Files detection - Extracts file paths from "Files:" sections and code blocks
- Commit SHA extraction - Finds commit references in output
- Choice labels - Returns button labels if kontask had choices
- Scope filtering - Filter by product/vibetools
📝 CLAUDE.md Updated
Added "Context Recovery at Turn Start" section with:
- Usage examples
- Example return format
- When to use guidance
- Warning not to use konui_get_task for context recovery
⚠️ Requires Restart
The new tool will be available after konsole restarts (next session start or explicit restart).
What's Next?
The tool is ready. On next turn start, Claude can call konui_get_recent_kontasks() to get context.
Quick Actions
Original Request
No layout configured
Details
Type
General
Status
Completed
Scope
vibetools
Tags
kontasksmcpcontextperformance
Created
8 Jan 2026, 10:52 am
Updated
8 Jan 2026, 10:52 am
Timing
⏱️ 261.3s
0 tools
● TTFE 0%
● Thinking 100%
● Tools 0%
Created By
claude
🔗 Git Commit
e9a457bf
Raw Data
{
"id": "059a9011-24a5-4c4a-b8de-29559f8ceda2",
"type": "general",
"status": "completed",
"title": "Turn: Implemented konui_get_recent_kontasks",
"description": "New MCP tool for context recovery at turn start",
"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;\">✅ konui_get_recent_kontasks Implemented</h2>\n\n<div style=\"background:#22543d;border:1px solid #22c55e;padding:16px;border-radius:6px;margin-bottom:16px;\">\n<h3 style=\"color:#22c55e;margin:0 0 8px 0;\">✓ Committed: e9a457bf</h3>\n<p style=\"margin:0;color:#9ca3af;\">konui/mcp/server.ts, CLAUDE.md</p>\n</div>\n\n<div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\">\n<h3 style=\"color:#61afef;margin:0 0 12px 0;\">📋 New Tool Spec</h3>\n<pre style=\"margin:0;background:#1e1e1e;padding:12px;border-radius:4px;overflow-x:auto;\">\n<span style=\"color:#c678dd;\">konui_get_recent_kontasks</span>(<span style=\"color:#e5c07b;\">count</span>: 1-5, <span style=\"color:#e5c07b;\">scope</span>?: string, <span style=\"color:#e5c07b;\">includeOutput</span>?: bool)\n\n<span style=\"color:#7f848e;\">Returns:</span>\n{\n <span style=\"color:#98c379;\">\"kontasks\"</span>: [\n {\n <span style=\"color:#e5c07b;\">\"id\"</span>: <span style=\"color:#98c379;\">\"abc123...\"</span>,\n <span style=\"color:#e5c07b;\">\"title\"</span>: <span style=\"color:#98c379;\">\"Turn: Fix notification badge\"</span>,\n <span style=\"color:#e5c07b;\">\"status\"</span>: <span style=\"color:#98c379;\">\"completed\"</span>,\n <span style=\"color:#e5c07b;\">\"scope\"</span>: <span style=\"color:#98c379;\">\"vibetools\"</span>,\n <span style=\"color:#e5c07b;\">\"tags\"</span>: [<span style=\"color:#98c379;\">\"ui\"</span>],\n <span style=\"color:#e5c07b;\">\"summary\"</span>: <span style=\"color:#98c379;\">\"Fixed badge to show unread count...\"</span>,\n <span style=\"color:#e5c07b;\">\"filesChanged\"</span>: [<span style=\"color:#98c379;\">\"konui/src/views/layout.ts\"</span>],\n <span style=\"color:#e5c07b;\">\"commitSha\"</span>: <span style=\"color:#98c379;\">\"4593ff7b\"</span>\n }\n ]\n}\n</pre>\n</div>\n\n<div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\">\n<h3 style=\"color:#22c55e;margin:0 0 12px 0;\">📊 Token Efficiency</h3>\n<table style=\"width:100%;border-collapse:collapse;\">\n<tr style=\"border-bottom:1px solid #4b5563;\">\n<th style=\"text-align:left;padding:8px;color:#fff;\">Approach</th>\n<th style=\"text-align:right;padding:8px;color:#fff;\">Tokens/3 kontasks</th>\n</tr>\n<tr style=\"border-bottom:1px solid #4b5563;\">\n<td style=\"padding:8px;\">konui_get_task × 3 (full HTML)</td>\n<td style=\"padding:8px;text-align:right;color:#ef4444;\">~3000-6000</td>\n</tr>\n<tr style=\"border-bottom:1px solid #4b5563;\">\n<td style=\"padding:8px;\">konui_list_tasks (metadata)</td>\n<td style=\"padding:8px;text-align:right;\">~450</td>\n</tr>\n<tr>\n<td style=\"padding:8px;color:#22c55e;font-weight:bold;\">konui_get_recent_kontasks (new)</td>\n<td style=\"padding:8px;text-align:right;color:#22c55e;font-weight:bold;\">~300-450</td>\n</tr>\n</table>\n</div>\n\n<div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\">\n<h3 style=\"color:#c678dd;margin:0 0 12px 0;\">🔧 Features Implemented</h3>\n<ul style=\"margin:0;padding-left:20px;line-height:1.8;\">\n<li><strong>Summary extraction</strong> - Parses HTML output for meaningful text, skips JSON/code blocks</li>\n<li><strong>Files detection</strong> - Extracts file paths from \"Files:\" sections and code blocks</li>\n<li><strong>Commit SHA extraction</strong> - Finds commit references in output</li>\n<li><strong>Choice labels</strong> - Returns button labels if kontask had choices</li>\n<li><strong>Scope filtering</strong> - Filter by product/vibetools</li>\n</ul>\n</div>\n\n<div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\">\n<h3 style=\"color:#e5c07b;margin:0 0 12px 0;\">📝 CLAUDE.md Updated</h3>\n<p style=\"margin:0;color:#9ca3af;\">Added \"Context Recovery at Turn Start\" section with:</p>\n<ul style=\"margin:8px 0 0 0;padding-left:20px;line-height:1.6;color:#9ca3af;\">\n<li>Usage examples</li>\n<li>Example return format</li>\n<li>When to use guidance</li>\n<li>Warning not to use konui_get_task for context recovery</li>\n</ul>\n</div>\n\n<div style=\"background:#1e3a5f;border:1px solid #3b82f6;padding:16px;border-radius:6px;margin-bottom:16px;\">\n<h3 style=\"color:#3b82f6;margin:0 0 8px 0;\">⚠️ Requires Restart</h3>\n<p style=\"margin:0;\">The new tool will be available after konsole restarts (next session start or explicit restart).</p>\n</div>\n\n<div style=\"background:#2d2d2d;padding:16px;border-radius:6px;\">\n<h4 style=\"margin:0 0 8px 0;color:#fff;\">What's Next?</h4>\n<p style=\"color:#9ca3af;margin:0;\">The tool is ready. On next turn start, Claude can call <code style=\"background:#1e1e1e;padding:2px 6px;border-radius:3px;\">konui_get_recent_kontasks()</code> to get context.</p>\n</div>\n</div>",
"choices": [
{
"label": "Test it now",
"value": "Start a new session to test konui_get_recent_kontasks tool",
"primary": true
},
{
"label": "Add to hook",
"value": "Add automatic context injection to UserPromptSubmit hook so Claude doesn't need to call the tool manually"
},
{
"label": "View code",
"value": "Show me the full implementation in konui/mcp/server.ts"
}
],
"requestedAt": "2025-01-08T10:55:00Z",
"requestId": "64e342f0-825c-4504-b996-db62626784b5",
"commitSha": "e9a457bf",
"turnTiming": {
"totalMs": 261308,
"ttfeMs": 102,
"thinkingMs": 261206,
"toolExecutionMs": 0,
"toolCallCount": 0,
"thinkingPct": 100,
"toolsPct": 0,
"ttfePct": 0
}
},
"createdBy": "claude",
"createdAt": "2026-01-08T00:52:30.918Z",
"updatedAt": "2026-01-08T00:52:36.128Z",
"requestId": "64e342f0-825c-4504-b996-db62626784b5",
"scope": "vibetools",
"tags": [
"kontasks",
"mcp",
"context",
"performance"
],
"targetUser": "claude"
}