{"slug": "pi-talk-mode-extension", "title": "Pi Talk Mode extension", "summary": "A developer has built a \"Talk Mode\" extension for the Pi coding agent that prevents the AI from editing, creating, or modifying files. The extension, toggled with Shift+Tab, injects a system prompt that restricts the agent to read-only operations, analysis, and discussion while blocking any implementation actions. When active, the extension displays a \"💬 talk\" status indicator and prevents the AI from applying changes even if explicitly requested.", "body_md": "| import type { ExtensionAPI, ExtensionContext } from \"@earendil-works/pi-coding-agent\"; | |\n| const STATUS_KEY = \"talk-mode\"; | |\n| const SHORTCUT = \"shift+tab\"; | |\n| const TALK_MODE_PROMPT = ` | |\n| [TALK MODE ACTIVE] | |\n| You are in Talk mode. | |\n| Purpose of Talk mode: | |\n| - Help the user think, discuss, and reason before acting. | |\n| - Answer questions directly. | |\n| - Evaluate tradeoffs and technical decisions. | |\n| - Research and inspect the codebase when useful. | |\n| - Help design an approach or make a plan. | |\n| - Review possible changes without applying them. | |\n| - Slow down implementation pressure and avoid jumping straight to code. | |\n| Hard restriction: | |\n| - Talk mode is not implementation mode. | |\n| - Do not edit, create, delete, move, or write files. | |\n| - Do not use edit or write tools. | |\n| - Do not run commands that modify files, git state, dependencies, services, or system state. | |\n| - Do not create temporary scripts, scratch files, or research files. | |\n| - Do not apply changes even if the user explicitly asks for a small tweak or direct implementation. | |\n| - If the user asks you to implement, modify, fix, apply, update, create, delete, or write something, tell them Talk mode is active and they need to disable Talk mode first. | |\n| Allowed: | |\n| - Read files. | |\n| - Search the codebase. | |\n| - Run read-only inspection commands. | |\n| - Analyze behavior. | |\n| - Explain options. | |\n| - Propose exact changes in prose. | |\n| - Provide patch snippets or code snippets for discussion only, without applying them. | |\n| - Make plans when requested. | |\n| Do not force a formal plan unless the user asks for one.`; | |\n| export default function talkModeExtension(pi: ExtensionAPI): void { | |\n| let enabled = false; | |\n| function updateStatus(ctx: ExtensionContext): void { | |\n| if (enabled) { | |\n| ctx.ui.setStatus(STATUS_KEY, ctx.ui.theme.fg(\"accent\", \"💬 talk\")); | |\n| } else { | |\n| ctx.ui.setStatus(STATUS_KEY, undefined); | |\n| } | |\n| pi.events.emit(\"talk-mode:changed\", enabled); | |\n| } | |\n| pi.registerShortcut(SHORTCUT, { | |\n| description: \"Toggle Talk mode\", | |\n| handler: async (ctx) => { | |\n| enabled = !enabled; | |\n| updateStatus(ctx); | |\n| ctx.ui.notify(enabled ? \"Talk mode enabled\" : \"Talk mode disabled\", \"info\"); | |\n| }, | |\n| }); | |\n| pi.on(\"session_start\", async (_event, ctx) => { | |\n| updateStatus(ctx); | |\n| }); | |\n| pi.on(\"before_agent_start\", async (event) => { | |\n| if (!enabled) return; | |\n| return { | |\n| systemPrompt: event.systemPrompt + TALK_MODE_PROMPT, | |\n| }; | |\n| }); | |\n| } |", "url": "https://wpnews.pro/news/pi-talk-mode-extension", "canonical_source": "https://gist.github.com/maxktz/f36b768a897f14c5557d32008d035dec", "published_at": "2026-06-05 05:45:03+00:00", "updated_at": "2026-06-05 13:45:05.283188+00:00", "lang": "en", "topics": ["ai-tools", "ai-agents", "large-language-models", "ai-products", "ai-safety"], "entities": ["Pi Talk Mode", "Earendil Works"], "alternates": {"html": "https://wpnews.pro/news/pi-talk-mode-extension", "markdown": "https://wpnews.pro/news/pi-talk-mode-extension.md", "text": "https://wpnews.pro/news/pi-talk-mode-extension.txt", "jsonld": "https://wpnews.pro/news/pi-talk-mode-extension.jsonld"}}