Code Rooms
---
name: dext3r
description: Use when an agent should bind the current Codex chat to the local DEXT3R companion, inspect or update DEXT3R session memory, run fast/council/deep perspectives, use DEXT3R m1nd flash, send/apply a prompt back to Codex, or recover from stale DEXT3R/MCP state. Prefer this skill whenever the user mentions DEXT3R, Dexter, pairing codes such as DX-..., companion memory, Council, North Star, session binding, or DEXT3R perspectives.
# DEXT3R Agent Operator
DEXT3R is the local Codex companion at `http://127.0.0.1:5777`. It stores append-only session memory, binds Codex chats to panel sessions, reads project scope/North Star, runs m1nd flash and Council perspectives, and can apply/send prompts to the visible Codex chat when permissions are available.
## First Gate
1. Check DEXT3R health:
```bash
curl -sS http://127.0.0.1:5777/api/health
```
2. If m1nd is needed, run trust before retrieval. Prefer live MCP if it works; if `mcp__m1nd__` returns `Transport closed`, use the local probe:
python3 "$CODEX_HOME/skills/m1nd-operator/scripts/probe_m1nd.py" run '[{"name":"trust_selftest","arguments":{"agent_id":"dext3r-agent","scope":"'"$PWD"'"}}]'
3. Treat `dexter_search_memory` as global search only. For session truth use `dexter_get_session_state` or `/api/panel/state?session_id=...`.
## Bootstrap Current Chat
Real Codex hooks include `session_id` and `cwd`. On the first `UserPromptSubmit`
with a project cwd, DEXT3R auto-creates a session code and an agent access
packet. This is cheap: it does not run Council, Genesis, Grok, or m1nd.
When the hook is installed with `--codex-output`, the first autobind also injects
extra developer context containing `DEXT3R Key`, `session_id`, panel URL, and
manual-only run policy, so the agent can echo the key in its first visible reply.
Use this at the start of a DEXT3R-aware chat:
curl -sS -X POST http://127.0.0.1:5777/api/sessions/bootstrap \
-H 'content-type: application/json' \
--data '{"prompt_hint":"distinctive text from the current user prompt","name":"Short session name"}'
MCP path, preferred when available:
- Call `dexter_bootstrap_current_chat` with `prompt_hint` and optional `name`.
- Read the returned `session_id`, `code`, `panel_url`, `north_star_required`, and `run_policy`.
- If `north_star_required=true`, ask the human for the North Star before running perspectives.
- Run perspectives only on explicit user command.
## Bind A Chat
Use this whenever the panel is on `/pair/DX-...` or the user gives a code.
MCP path, preferred when `mcp__dexter__` exposes the tools:
1. Call `dexter_pairing_help` if the agent is unsure.
2. Call `dexter_bind_current_chat` with:
- `code`: panel code, for example `DX-FPPNZA`
- `prompt_hint`: a distinctive substring of the current user message
- `name`: short human-readable session name
3. If DEXT3R returns a binding conflict, do not pass `force=true` unless the user explicitly wants a rebind.
HTTP fallback:
curl -sS -X POST http://127.0.0.1:5777/api/sessions/bind-current \
--data '{"code":"DX-CODE","prompt_hint":"current user text","name":"Project current chat"}'
If binding succeeds, open or tell the user to use `http://127.0.0.1:5777/s/<session_id>`.
## Session Operations
Use explicit `session_id` whenever possible.
- State: `GET /api/panel/state?session_id=<id>`
- List sessions: `GET /api/sessions`
- Rename: `POST /api/sessions/rename`
- North Star: `POST /api/sessions/north-star`
- Project scope: `POST /api/sessions/project`
- Rebuild digest: `POST /api/sessions/digest/rebuild`
- m1nd context: `POST /api/m1nd/flash` or `POST /api/sessions/m1nd-context`
- Perspectives: `POST /api/dexter/orchestrate`
- Daily report: `POST /api/reports/daily`
Run modes:
- `fast`: cheap/current orchestrator.
- `council`: four-lane Council memory engine; default for high-quality DEXT3R perspectives.
- `deep`: Council with larger budget.
Example:
curl -sS -X POST http://127.0.0.1:5777/api/dexter/orchestrate \
--data '{"session_id":"SESSION_ID","run_mode":"council","input":"gere perspectivas para o proximo movimento"}'
## m1nd With DEXT3R
Use DEXT3R m1nd flash when an agent needs scoped context without keeping a long m1nd process open:
curl -sS -X POST http://127.0.0.1:5777/api/m1nd/flash \
--data '{"session_id":"SESSION_ID","query":"what to inspect","top_k":8,"ensure_ingest":true,"timeout_ms":3000}'
Persist only summaries/provenance in DEXT3R, not full graph dumps. If live m1nd MCP is stale, record that as a host binding issue and continue through this flash/probe path.
## Apply Or Send To Codex
For a suggestion card, prefer `Copiar`/clipboard unless the user asked for active insertion.
To ask DEXT3R to send a prompt through the visible Codex target:
curl -sS -X POST http://127.0.0.1:5777/api/codex/visible/send \
--data '{"session_id":"SESSION_ID","input":"prompt to send","timeout_ms":8000}'
If this fails, fall back to `/api/codex/app-server/turn` only as backend turn start; it does not guarantee visible chat insertion.
## Safety Rules
- Do not silently mix sessions. Explicit `session_id` wins over active/latest.
- Do not use global memory search as scoped truth.
- Do not call `force=true` on pairing conflicts without explicit user intent.
- Workstyle intelligence is method/creativity/attention/execution analysis, not psychological diagnosis.
- Visual/computer observation requires consent and should store summaries/hashes, not raw private screenshots unless explicitly requested.
- Council lanes may write DEXT3R brain memory, not mutate the real project.