# Mode Extension V3 IdeasNot approved for implementation. Discussion bucket.
## Tool policy syntaxGlob-based allow/deny syntax for tools:
```yamltools: ["*", "!write"]
tools: ["!*", "read", "grep"]
```
Needs precise ordered semantics and custom-tool behavior.
Open questions:
- Match against all loaded tools or only currently active tools?
- Does `*` include extension/custom tools?
- How to display effective set without confusing the LLM?
- What happens when tools appear after mode activation?
## Tool metadata in active blockV1/V2 intentionally omit tools from the active block.
V3 may reintroduce generated tool metadata if all loaded/custom tools can be tracked safely and cheaply.
## Baseline restore/updateV1 restores previous tools/model/thinking on `/mode off`.
V3 discussion:
- Capture baseline on startup?
- Update baseline while no mode active?
- Detect manual `/model`, thinking, or tools changes while a mode is active?
- Does switching from mode A to mode B restore baseline first, then apply B?
## Mode-local bash wrappers/guardsDeferred.
This is a permission/sandbox feature in disguise and can create false safety.
Questions:
- Is shell allowlisting worth it?
- Is it limited to built-in `bash`?
- How to handle `python -c`, `node -e`, `git`, `tee`, redirection, generated scripts?
- How to communicate limitations without lying?
## Historical span toolset metadataV2 spans include only mode + provider/model.
V3 may add toolset metadata if tool tracking is solved:
```text<mode_span mode="plan" model="openai/gpt-5.2-codex" tools="ro"/>
```
Not before tool policy/tracking design is done.
## Rich interactive switcherV1 has a fuzzy picker via `/mode select` and `alt+m`.
Future rich picker ideas:
- richer picker overlay
- render icon
- render name/id
- render description
- preview model/thinking/tools
Needs TUI design.
## Mode transitionsPossible per-mode transition hooks inside same extension:
- before-enter
- after-enter
- before-exit
- after-exit
No extension-to-extension API.
## Mode-scoped prompt templates or skillsPossible but risky.
Questions:
- Should active mode filter prompt templates/skills?
- Does this mutate Pi resources or only model-visible prompt?
- How to avoid reload/settings mutation?