返回 CodeWhale
GUIDE.md
根目录 / docs / GUIDE.md
1 # Codewhale User Guide
2
3 This guide is for your first hour with Codewhale. It explains the main
4 workflow, the important safety controls, and where to go next when you need a
5 complete reference.
6
7 Codewhale has deeper reference documents for installation, configuration,
8 providers, modes, keybindings, tools, and operations. Use this page as a guided
9 walkthrough, then follow the "Next" links when you need every option.
10
11 ## 1. Welcome to Codewhale
12
13 Codewhale is a terminal coding agent. You run it from a workspace, give it a
14 task, and it can use structured tools to inspect files, run commands, edit
15 code, and report back with evidence.
16
17 The important difference from a normal chat model is that Codewhale is built
18 around a harness:
19
20 - It keeps the active workspace and session visible.
21 - It routes each turn through explicit modes and approval rules.
22 - It shows tool calls in the transcript instead of hiding the work.
23 - It can preserve sessions, fork conversations, and continue later.
24 - It can run sub-agents for focused background work.
25
26 You can use Codewhale for small questions:
27
28 ```text
29 Explain the authentication flow in this repository.
30 ```
31
32 You can also use it for multi-step work:
33
34 ```text
35 Find the failing validation path, propose a fix, and wait for my approval
36 before editing files.
37 ```
38
39 For a new repository, start conservatively. Ask Codewhale to explore and plan
40 before asking it to change files. That gives you a reviewable path and makes it
41 easier to catch wrong assumptions early.
42
43 Next: [ARCHITECTURE.md](ARCHITECTURE.md) explains the internal harness and
44 runtime model.
45
46 ## 2. First Launch
47
48 For a new macOS or Linux installation, use the official GitHub release.
49 The installer verifies the release checksums and provides the same runtime
50 under the `codewhale` and `codew` command names:
51
52 ```bash
53 curl -fsSL https://codewhale.net/install.sh | sh
54 ```
55
56 Windows users should choose the matching installer or archive from
57 [GitHub Releases](https://github.com/Hmbown/CodeWhale/releases/latest).
58 For an existing direct install, use `codewhale update --check`, then
59 `codewhale update`. npm and Cargo remain secondary packaging routes; Cargo
60 also supports source builds where a compatible prebuilt is unavailable.
61 For occupied directories, package-managed installs, and PATH setup, follow
62 [the installation and migration guide](INSTALL.md#recommended-official-github-releases).
63 Android/Termux uses its own [preview archive or source-build path](INSTALL.md#android--termux-arm64).
64
65 Docker is also available when you want an isolated runtime:
66
67 ```bash
68 docker volume create codewhale-home
69 docker run --rm -it \
70 -e DEEPSEEK_API_KEY="$DEEPSEEK_API_KEY" \
71 -v codewhale-home:/home/codewhale/.codewhale \
72 -v "$PWD:/workspace" \
73 -w /workspace \
74 ghcr.io/hmbown/codewhale:latest
75 ```
76
77 Once the install directory is on PATH, launch Codewhale from the repository or
78 directory you want it to work in:
79
80 ```bash
81 codewhale
82 ```
83
84 For the default GitHub installer destination, you can use
85 `"$HOME/.local/bin/codewhale"` until that directory is on PATH.
86
87 On first launch, Codewhale asks only for decisions this installation still
88 needs: language when it cannot infer one, a provider when no usable route is
89 configured, and workspace trust when the folder requires a decision. The
90 provider step includes an explicit offline route. The ready screen then opens
91 the real composer, preserving a task supplied on the command line or suggesting
92 a first task for the current folder.
93
94 Everything optional stays available after that. Use `/setup` for the
95 progressive setup and repair guide, `/settings` for the full typed editor, and
96 `/constitution` when you want to customize the bundled working agreement.
97 The localized telemetry choice appears only after the workspace is ready and
98 does not block the composer.
99
100 DeepSeek is the default provider. If you want to configure its key before or
101 after the first launch, the most direct setup path is:
102
103 ```bash
104 codewhale auth set --provider deepseek
105 ```
106
107 You can also provide a key through the environment:
108
109 ```bash
110 export DEEPSEEK_API_KEY="your-key"
111 codewhale
112 ```
113
114 New Codewhale config is stored under `~/.codewhale/config.toml`. Legacy
115 `~/.deepseek/config.toml` files are still supported for users migrating from
116 the old name.
117
118 Use `/constitution` to review or change standing guidance. After setup, run a
119 doctor check:
120
121 ```bash
122 codewhale doctor
123 ```
124
125 Use the JSON form when you need a machine-readable report for an issue:
126
127 ```bash
128 codewhale doctor --json
129 ```
130
131 Both forms are offline by default. They report structural configuration and
132 literal unknown/not-probed credential states without loading workspace `.env`
133 credentials, opening secret/OAuth files, probing a keyring, contacting a
134 provider, or starting MCP servers. Use `--check-updates`, `--probe-api`,
135 `--probe-local`, or `--probe-mcp` only when you intentionally want that live
136 boundary. JSON remains offline and does not accept live flags.
137
138 JSON reports credential `source` separately from literal `availability`.
139 Configured environment, external-auth, OAuth, consent, and secret-store sources
140 remain `not_probed`; their declaration alone does not make Setup or fleet ready.
141 Only a structurally present literal config value, or a route where credentials
142 are not required, certifies offline readiness. A legacy secret-store sentinel on
143 a route that cannot use the shared store is reported separately as
144 `secret_store_unavailable`/`unavailable`, not as eligible or merely unknown.
145
146 Both `doctor` and `doctor --json` also include a session-recovery diagnostic
147 that compares legacy session filenames against the current store and reports
148 one of `isolated`, `no_legacy_sessions`, `migration_pending`,
149 `migration_incomplete`, `migration_complete`, or `scan_failed`; it never reads
150 session contents. Use `migration_pending` or `migration_incomplete` as your
151 cue to finish moving sessions from `~/.deepseek` to `~/.codewhale`, the same
152 legacy-path migration described above. Setting an explicit `CODEWHALE_HOME`
153 suppresses this ambient inspection.
154
155 Next: [INSTALL.md](INSTALL.md) covers platform-specific install paths,
156 [CONFIGURATION.md](CONFIGURATION.md) covers config resolution, and
157 [PROVIDERS.md](PROVIDERS.md) covers provider IDs and credentials.
158
159 ## 3. Your First Task
160
161 Start with a read-only task in a real workspace:
162
163 ```text
164 Map the repository structure and tell me where the CLI entrypoint lives.
165 ```
166
167 Then ask for a focused plan:
168
169 ```text
170 I want to add a small validation for empty config values. Inspect the relevant
171 code and propose the smallest safe change before editing anything.
172 ```
173
174 When you are ready for edits, be specific about the acceptance criteria:
175
176 ```text
177 Implement the validation you proposed. Keep the change scoped to config
178 parsing, add or update the narrowest test, and run the relevant check.
179 ```
180
181 Good first prompts include four details:
182
183 - The outcome you want.
184 - The files, feature, or behavior you care about.
185 - What is out of scope.
186 - What verification should count as done.
187
188 For example:
189
190 ```text
191 Fix the broken provider error message in the config loader. Do not change the
192 provider registry. Add a regression test and run only the config crate tests.
193 ```
194
195 If you are not sure where the bug is, say that:
196
197 ```text
198 Investigate why `codewhale doctor` reports the wrong provider. Do not edit
199 files yet. Return the likely cause, evidence, and a proposed patch plan.
200 ```
201
202 Codewhale works best when you let investigation and implementation happen in
203 separate steps for unfamiliar code. For small, well-understood changes, a
204 single implementation request is fine.
205
206 Next: [MODES.md](MODES.md) explains when to use Plan, Act, and Operate.
207
208 ## 4. Understanding the Interface
209
210 The interactive TUI has a few stable regions:
211
212 - Header: current session, active model, mode, and high-level status.
213 - Transcript: the conversation, tool calls, command output summaries, and
214 model responses.
215 - Composer: where you type prompts, slash commands, and file mentions.
216 - Workbar: the strip under the composer (or an optional side workbar) that
217 holds the active goal, the to-do list, and sub-agents. Rows stay for the
218 whole session — finished work reads as done rather than disappearing — and
219 clicking a row (or pressing `Enter` on it) opens its detail.
220 - Status and footer areas: live activity, queued follow-ups, and short command
221 hints.
222
223 When the model asks a question (`request_user_input`), a bottom sheet opens
224 over the transcript rather than a centered overlay. The conversation stays
225 visible above it. Use `PageUp`/`PageDown`, `Home`/`End`, or modified `↑`/`↓`
226 (`Ctrl`, `Alt`, or `Shift`) to review the transcript while the sheet stays open.
227 The mouse wheel scrolls the transcript above the sheet and the question content
228 over the sheet itself. Moving the highlight or typing brings that content back
229 into view after wheel browsing. Use `↑`/`↓` to move, `Enter` to confirm, `←`/`h`
230 to go back to a previous question, and `Esc` to cancel the whole request.
231 Every question offers an "Other" row for a custom response; that text stays on
232 screen while you type. Keys for the sheet are in [KEYBINDINGS.md](KEYBINDINGS.md).
233
234 The bottom chrome is configurable. Run `/statusline` to choose what is
235 visible, or set `[tui].status_items` in `config.toml`. Each key owns exactly
236 one thing on screen: `mode` is the posture bar's plan/act/operate chip, and
237 `model`, `context_percent`, `cost`, `balance` (prepaid providers only:
238 DeepSeek, DeepSeekCN, OpenRouter, SiliconFlow), `cache`, `tokens` and
239 `ttft`, `output_rate`, `workspace` and `git_branch` are segments of the metrics line below it. Omit
240 `status_items` to keep the built-in default; set it to `[]` to strip the
241 metrics line down to the help hint.
242
243 `workspace` and `git_branch` are opt-in. The workspace chip shows the folder
244 name; linked worktrees include its parent to distinguish repeated names. The
245 branch chip shows the current branch or a short detached HEAD SHA, with `(wt)`
246 for linked worktrees. Both keep the last 24 display columns when long. Git
247 metadata refreshes in the background on the existing 15-second cadence and
248 when a refresh is requested; unavailable Git data removes the branch chip.
249 These identify the active session workspace. The full path remains in `/status`.
250
251 `context_percent` is on by default and shows `ctx NN%` at every fullness —
252 0.9.12 went silent below 50% and left most of a session with no context
253 signal at all. The reading keeps its warning colour from 80% up.
254
255 The keys `status`, `agents`, `reasoning_replay`, `prefix_stability`,
256 `last_tool_elapsed` and `rate_limit` were retired in 0.9.13:
257 they drove nothing. Old configuration files still load — the retired keys are
258 ignored with a warning in the log.
259
260 `status_items` composes the rows; two size presets decide how much of each
261 row paints. `[tui].posture_bar` and `[tui].metrics_line` each take `full`,
262 `compact`, or `hidden`. The posture bar defaults to `full` so active controls
263 stay visible; the metrics line defaults to `compact` to keep selected performance
264 readings while removing secondary counts and help. These are also settable at runtime with
265 `/config posture_bar compact`. TOML values must be lowercase; `/config`
266 accepts either case. `compact` is the row after its first shed
267 rungs: the posture bar keeps its permission and mode chips — and the cap
268 warning, which is advice, not decoration — and drops the clocks, counts and
269 hint; the metrics line keeps the route, the context reading, the cost and
270 the balance, plus selected TTFT and output rate when space allows, and drops
271 secondary counts and the help hint. `hidden` gives the
272 row back to the transcript. A small tmux pane can hide both rows without
273 touching what `/statusline` composes.
274
275 Both `ttft` and `output_rate` are on by default and work in full or compact
276 rows. `/statusline` lets you toggle them separately; Space previews, Enter saves,
277 and Esc restores your previous settings. Legacy `session_metrics` still enables
278 both readings. The pair shows: `ttft 1.5s` — the mean time to first streamed token — and `120 avg tok/s`,
279 the session's provider-reported output tokens divided by the measured request
280 seconds for those same calls. The rate includes connection setup, time to first
281 token and pauses within a response, and excludes tools and idle time between
282 calls. It measures effective request throughput, not decoder speed. Streaming
283 and non-streaming calls follow the same rule; receipts without individual
284 request timing are excluded from both tokens and time. While a request runs,
285 the last measured average stays visible. Both readings use the same
286 accumulators `/status` prints in full. Missing evidence is omitted rather than
287 estimated. On narrow rows the pair sheds before cost and context.
288
289 The transcript is the audit trail. When Codewhale reads files, runs commands,
290 or edits code, the action appears there. If a command fails, use the visible
291 failure output as part of your next instruction instead of starting over.
292
293 The composer accepts normal prompts and slash commands. Type `/` to discover
294 available commands. Use file mentions when you want the model to focus on a
295 specific file or directory instead of searching broadly.
296
297 The workbar is useful when a turn spans multiple steps. It keeps the goal,
298 the to-do list, and agent state visible while the transcript continues to
299 grow — including after the work settles, so you can still open what happened.
300
301 Keyboard shortcuts vary by context, terminal, and platform. This guide avoids
302 duplicating the full shortcut catalog so it does not drift from the TUI.
303
304 Next: [KEYBINDINGS.md](KEYBINDINGS.md) is the complete shortcut reference.
305
306 ## 5. Modes
307
308 Codewhale has three visible TUI modes:
309
310 | Mode | Use it for | Default posture |
311 | --- | --- | --- |
312 | Plan | Exploration, design, and review before changes | Read-only investigation |
313 | Act | Normal multi-step coding work | Tool use with approval gates |
314 | Operate | Direct work plus parallel or background coordination | Tools follow the active posture; delegate when useful |
315
316 Switch modes from the TUI with the mode picker:
317
318 ```text
319 /mode
320 ```
321
322 Or switch directly:
323
324 ```text
325 /mode plan
326 /mode act
327 /mode operate
328 ```
329
330 Plan mode is the safest place to start in an unfamiliar repository. It is for
331 inspection and decision-making, not file edits.
332 For non-trivial work, Plan mode's confirmation prompt can show a grounded
333 PlanArtifact: objective, context, sources used, critical files, constraints,
334 approach, verification plan, risks, and handoff notes. Empty sections are
335 visible when the agent uses the rich artifact shape, so you can ask for a
336 revision instead of accepting an under-specified plan.
337
338 Act mode is the default for most contribution work. It lets Codewhale read,
339 run checks, and edit files while keeping risky actions behind approval gates.
340
341 Operate keeps that direct tool surface and its approval, sandbox, shell,
342 ask-rule, and repository protections. Small or tightly coupled work stays
343 direct. Multi-step delegation uses a compact Workflow plan with dependencies,
344 bounded scopes, and completion evidence passed between steps. Fleet configures
345 and manages those same sub-agents and their roles. One bounded, independent
346 task can use a direct agent; continued work reuses it through `followup`.
347 Heavy work can also be proposed to a Daytona cloud agent with `codewhale
348 dispatch` or `/dispatch` (explicit confirmation; remotes are `github` / `cnb` /
349 `gitee`). See [DAYTONA_CLOUD_DISPATCH.md](DAYTONA_CLOUD_DISPATCH.md).
350
351 For trusted workspaces where you intentionally want actions to proceed without
352 approval prompts, select the Full Access permission posture with `Shift+Tab`.
353 Do not use Full Access in a repository you do not trust.
354
355 Modes are separate from model routing. `Tab` cycles visible modes when the
356 composer is idle, while `/model auto` controls model and thinking selection for
357 turns.
358
359 You can also change approval behavior from `/config` by editing the approval
360 mode. Use this only when you understand how it changes tool execution.
361
362 Next: [MODES.md](MODES.md) has the full mode, approval, and trust-mode
363 reference.
364
365 ## 6. Slash Commands
366
367 Slash commands are typed into the composer. They are useful when you want to
368 change Codewhale state directly instead of asking the model in natural
369 language.
370
371 Common commands for first-time users:
372
373 | Command | Use |
374 | --- | --- |
375 | `/mode` | Open the mode picker or switch with `/mode agent` |
376 | `/model` | Select a model or use `/model auto` |
377 | `/provider` | Pick the active API provider |
378 | `/fleet` | Open the selected fleet's member roster |
379 | `/fleet saved` | Pick or switch among named saved fleets |
380 | `/goal` | Set a persistent objective the agent works toward across turns; bare `/goal` shows progress |
381 | `/workflow` | Orchestrate the current work as a Workflow; `status`, `cancel`, `settings` answer without a model turn |
382 | `/workflows` | Open the live Workflow run dashboard: every run this workspace's journal keeps, with phases, children, progress, and host-side cancel |
383 | `/config` | Edit runtime and provider settings |
384 | `/statusline` | Choose which footer status chips are visible |
385 | `/compact` | Summarize long context to recover token budget |
386 | `/copy` | Copy the last completed assistant response to the clipboard |
387 | `/review` | Ask for a structured review workflow |
388 | `/memory` | Inspect or manage memory when enabled |
389 | `/mcp` | Configure or inspect MCP server integration |
390 | `/plugin` | Review and manage disabled-by-default local plugin bundles |
391 | `/rc` | Hand this exact session to the signed-in Codewhale web app |
392
393 Toolbox commands stay searchable when you type them directly: `/models`
394 fetches live endpoint IDs, `/modeldb` opens the bundled model reference, and
395 `/rlm` loads a file or block of text into a working context that stays
396 available for the rest of the session.
397
398 Use `/provider` when you want to switch away from the default DeepSeek route.
399 Provider IDs, environment variables, model defaults, and capability notes are
400 kept in the provider registry document.
401
402 Soft-auto multi-agent work: [AUTOMATIC_WORKFLOWS.md](AUTOMATIC_WORKFLOWS.md).
403
404 Posting Codewhale PR reviews as a bot identity:
405 [GITHUB_APP.md](GITHUB_APP.md).
406
407 Next for durable multi-worker work: [FLEET_WORKFLOW_TUTORIAL.md](FLEET_WORKFLOW_TUTORIAL.md)
408 walks through fleet task specs, monitoring, and Workflow authoring.
409
410 Fleet is the public noun for the durable roster. `codewhale fleet …` is
411 the command and `/fleet` the slash command. The Fleet name is
412 shared by what has to stay stable across versions: the durable ledger
413 `.codewhale/fleet.jsonl`, saved rosters `fleets/<name>.toml`, the `[fleet]`
414 config table, and the `codewhale workflow run --fleet` flag.
415
416 Use `/model auto` when you want Codewhale to choose the model and thinking
417 level per turn. When the DeepSeek routing model is available, Auto may select
418 any runnable provider/model pair in the redacted inventory. That classification
419 sends the latest request (capped at 4,000 characters) plus a bounded summary of
420 up to six recent context rows (900 characters each) to
421 `DeepSeek / deepseek-v4-flash`. Credentials, endpoints, and provider error text
422 are not included in the inventory. Without that router, Auto uses a local,
423 provider-aware heuristic and sends no routing request. If a classifier attempt
424 fails validation or errors, Auto falls back to that heuristic while retaining
425 the attempted classifier data path in the turn receipt.
426
427 The `/model` picker states which data path is available and shows the last
428 resolved route. `Ctrl+O` opens the reasoning detail for the selected or current
429 turn; `Ctrl+Alt+O` (or `/turn inspect`) opens the whole-turn Turn Inspector,
430 whose model-route section records the concrete provider/model, strong/fast pair,
431 selected tier, selection scope, route reason, and whether the classifier received
432 routing context. Use a
433 fixed model when you need repeatable comparisons, a strict provider boundary,
434 or no classification request.
435
436 Use `/compact` when a session gets long and the model starts carrying too much
437 history. Compaction trades raw transcript detail for a concise working summary.
438
439 This guide intentionally does not list every command. The command surface
440 changes more often than the onboarding flow, and the TUI command palette is the
441 source of truth while you are inside a session.
442
443 Next: [CONFIGURATION.md](CONFIGURATION.md) covers runtime settings and
444 [MCP.md](MCP.md) covers Model Context Protocol integration.
445 [PLUGIN_BUNDLES.md](PLUGIN_BUNDLES.md) covers the disabled-by-default bundle
446 inventory, capability review, and namespaced Skill/MCP activation boundary.
447
448 ## 7. Working with Tools
449
450 Codewhale tools are structured actions. Instead of only producing prose, the
451 model can call tools to inspect and change the workspace.
452
453 Examples of tool-backed work include:
454
455 - Reading a file before explaining it.
456 - Searching for call sites before proposing a refactor.
457 - Running a focused test command.
458 - Applying a small patch.
459 - Opening a sub-agent for parallel investigation.
460
461 Tool use is governed by mode, approvals, and sandbox policy. The exact behavior
462 depends on the current mode and config, but the basic rule is simple: start in
463 Plan for read-only exploration, use Act for normal changes, and reserve Full
464 Access for trusted automation.
465
466 The workspace boundary matters. Codewhale is expected to work in the directory
467 you launched it from or the workspace you configured. Be explicit when a task
468 should stay inside a repo:
469
470 ```text
471 Only inspect and edit files under this repository. Do not touch parent
472 directories or global config.
473 ```
474
475 When a command needs network, writes outside the workspace, or a risky shell
476 operation, expect an approval prompt unless you have configured more permissive
477 behavior.
478
479 Good tool instructions are concrete:
480
481 ```text
482 Run the narrowest test that covers this parser change. If it fails, report the
483 failure and stop before broadening the test scope.
484 ```
485
486 Avoid asking for broad cleanup during a focused fix. Smaller tool scopes make
487 the transcript easier to review and the final diff easier to merge.
488
489 Next: [TOOL_SURFACE.md](TOOL_SURFACE.md) lists the tool surface and
490 [SANDBOX.md](SANDBOX.md) explains sandbox behavior.
491
492 ## 8. Sub-agents and Parallel Work
493
494 Sub-agents are background child agents. The parent session gives a child a
495 focused task, receives an agent id, and can continue working while the child
496 runs.
497
498 The main orchestration tool is:
499
500 - `agent`: start a focused child with a task and role. The child runs in the
501 background and returns a compact receipt plus transcript handle.
502
503 You normally do not need to call these tools directly. Ask for parallel work in
504 plain language:
505
506 ```text
507 Open one read-only explorer for the config crate and another for the TUI
508 provider picker. Have both return file references and risks before we plan the
509 fix.
510 ```
511
512 Useful roles include:
513
514 | Role | Good for |
515 | --- | --- |
516 | `general` | Multi-step tasks; the default when no role is specified |
517 | `explore` | Read-only code mapping |
518 | `plan` | Design and migration planning |
519 | `review` | Bug-focused review of an existing change |
520 | `implementer` | A tightly specified edit |
521 | `verifier` | Running checks and reporting pass/fail evidence |
522
523 Sub-agents are most useful when work can be separated cleanly. Do not use them
524 for tiny edits, and do not ask multiple agents to write the same files at the
525 same time.
526
527 ### How long work stays coherent
528
529 Work that spans many turns does not rely on an ever-growing chat transcript.
530 This is ordinary Agent behavior — there is nothing to turn on and no separate
531 workflow to learn:
532
533 - A working context stays loaded for the session. Large source material and the
534 durable transcript are held as data the agent can search and slice, and useful
535 variables and imports survive across turns.
536 - Workflow composes independent `task(...)` calls and parallel fan-out.
537 - `agent` messages and follow-ups coordinate active children directly.
538 - Goals retain the durable objective across the work.
539
540 `/rlm <file-or-text>` points that working context at a specific file or block
541 of text. The historic action-shaped `rlm` tool remains registered only so older
542 sessions replay, and is deliberately not taught to new model turns.
543
544 Codewhale can also keep a small project-local ledger at
545 `.codewhale/harness/state.json`: evidence-backed prompt notes, reusable child
546 briefs, and skill-routing hints. Later turns receive it as untrusted
547 supplemental guidance, never as authority or executable instructions. Reading it
548 is automatic; adding or removing an entry goes through the normal approval
549 receipt. It is separate from personal memory, and it must never hold secrets,
550 scratch transcripts, or unverified claims.
551
552 Next: [SUBAGENTS.md](SUBAGENTS.md) covers roles, lifecycle, concurrency, and
553 output contracts.
554
555 ## 9. Skills
556
557 Skills are reusable instruction packs. A skill is usually a `SKILL.md` file
558 that teaches Codewhale how to perform a recurring workflow, use a tool family,
559 or follow a project convention.
560
561 Use skills when a task has a repeatable process:
562
563 - Reviewing a specific kind of PR.
564 - Working with a document or spreadsheet format.
565 - Following a team release checklist.
566 - Using a project-specific memory or wiki workflow.
567
568 Inside the TUI, `/skill <name>` activates a skill when one is available, and
569 bare `/skills` opens the Skills Manager (owned-only inventory, no network). Use
570 `/skills <prefix>`, `/skills inspect`, `/skills --remote`, `/skills suggest <task>`,
571 or `/skills sync` for the text/registry paths. Suggestions rank the remote
572 catalog but never install or activate anything. The command palette can also
573 surface skill entries alongside normal slash commands.
574
575 Good skills are narrow. They should tell the model what workflow to follow,
576 what evidence to collect, and what to avoid. They should not hide credentials
577 or replace normal repository documentation.
578
579 If a repository has its own instructions, treat them as part of the active
580 work. Read the local guidance before editing, and keep any contribution within
581 the repository's conventions.
582
583 Next: see [SKILLS.md](SKILLS.md) for the manager, ownership, and provenance
584 rules; [CLAUDE_PLUGIN_COMPAT.md](CLAUDE_PLUGIN_COMPAT.md) for Claude Code
585 skill/plugin compatibility; and [CONFIGURATION.md](CONFIGURATION.md) for config
586 paths and project authority.
587
588 ## 10. Getting Help
589
590 Start with doctor output:
591
592 ```bash
593 codewhale doctor
594 ```
595
596 Use JSON when filing a detailed issue:
597
598 ```bash
599 codewhale doctor --json
600 ```
601
602 For authentication problems, use the structural source state to identify what
603 is declared. Doctor deliberately does not inspect environment, secret-store,
604 keyring, or OAuth token values. When a live check is appropriate, opt in with
605 `codewhale doctor --probe-api` (or `--probe-local` for a local endpoint).
606
607 For provider problems, confirm the active provider and model:
608
609 ```text
610 /provider
611 /model
612 ```
613
614 For long or confusing sessions, use `/compact` to reduce context pressure, or
615 start a fresh session in the same workspace and summarize what you need.
616
617 When reporting an issue, include:
618
619 - Codewhale version.
620 - Install method.
621 - Operating system and terminal.
622 - Provider and model.
623 - The exact command or prompt.
624 - Relevant doctor output.
625 - Whether the problem happens in a fresh workspace.
626
627 Do not paste API keys, private source code, or secrets into a public issue.
628
629 Next: [OPERATIONS_RUNBOOK.md](OPERATIONS_RUNBOOK.md) has operational triage and
630 recovery steps.
631
632 ## FAQ
633
634 ### Is Codewhale only for DeepSeek?
635
636 DeepSeek is the default and first-class route, but Codewhale also supports
637 other hosted and local OpenAI-compatible providers. Use `/provider` or
638 `codewhale --provider <id>` to choose a provider. Keep the provider registry
639 open when configuring a non-default route.
640
641 ### Which mode should I use first?
642
643 Use Plan for unfamiliar code, Act for normal implementation, and Full Access
644 only for trusted repositories where automatic execution is acceptable.
645
646 ### Why does Codewhale ask before running commands?
647
648 Approvals are part of the safety model. Shell commands, paid tools, writes, and
649 actions outside the expected workspace can have side effects. Approval prompts
650 let you keep control while still letting the model do useful work.
651
652 ### How do I run a Python file on macOS?
653
654 Open Terminal in the folder that contains the file and run:
655
656 ```bash
657 python3 your_file.py
658 ```
659
660 If macOS says `python3` is missing, install Python from
661 [python.org](https://www.python.org/downloads/macos/) or with Homebrew:
662
663 ```bash
664 brew install python
665 ```
666
667 Inside Codewhale, ask the agent to inspect the file and run it with
668 `python3 your_file.py`. If the script needs packages, install them in a virtual
669 environment first:
670
671 ```bash
672 python3 -m venv .venv
673 source .venv/bin/activate
674 python3 -m pip install -r requirements.txt
675 python3 your_file.py
676 ```
677
678 ### Where is my config stored?
679
680 New Codewhale config uses `~/.codewhale/config.toml`. Legacy
681 `~/.deepseek/config.toml` remains supported for compatibility. Project overlays
682 can also affect behavior when a workspace config exists.
683
684 ### How do I keep costs predictable?
685
686 Use `/model auto` for routing, choose a fixed model when you need a strict
687 profile, and compact long sessions. For larger tasks, ask Codewhale to plan
688 before implementing so you do not spend tokens on the wrong path.
689
690 ### How do I continue previous work?
691
692 Codewhale saves sessions. Use the session picker or resume/continue CLI paths
693 documented in the README and modes guide. For a risky experiment, fork the
694 session before changing direction.
695
696 The `/sessions` picker starts scoped to the current workspace so resumes stay
697 attached to the project you opened. Press `a` in the picker to show sessions
698 from every workspace, or run `codewhale sessions` to list all saved sessions
699 with last-updated timestamps before resuming a specific id.
700
701 To archive the durable record and its artifacts, run:
702
703 ```sh
704 codewhale sessions export <id-or-unique-prefix> --output session.tar.xz
705 ```
706
707 The archive contains `session.json`, a portable `container.json`, a manifest,
708 and regular files under `artifacts/`. Use `--skip-artifacts` for the record
709 only, `--compression 0` through `9` to choose the xz preset (default `6`),
710 and `--force` to replace an existing output. Store the archive outside the
711 session store. Symlinks are skipped; linked artifact roots, hard links,
712 nonportable filenames, and trees exceeding 64 directory levels or 100,000
713 entries fail the export without replacing the destination.
714
715 Unlike the sanitized Markdown `/export`, these archives retain unredacted
716 session content, including system prompts, thinking, tool calls and results,
717 journal branches, and approval receipts. Extract `session.json` and open it
718 with `/load` in the TUI; `/resume` imports the conversation only. Extracted
719 artifacts remain separate files and are not installed into the artifact store
720 by `/load`. Pause writes before archiving if every artifact must reflect the
721 same instant; growing files are bounded to their recorded size and shrinking
722 files abort the export.
723
724 To continue the exact running session from the web app, type `/rc` or launch
725 with `codewhale rc`. Approve the one-time code in the system browser. While the
726 lease is active, the browser owns new prompts and approvals and the terminal is
727 a readable safety surface. Once connected, the banner and a transcript note
728 show the live session link (`https://app.codewhale.net/session?run=…`);
729 `/rc open` opens it in your browser and `/rc link` prints it. `/rc status`
730 shows ownership, `/rc stop` returns it to the terminal, and interrupt remains
731 available. A dropped connection keeps local input locked until the last web
732 lease expires so two controllers never race. Every folder you enroll from one
733 terminal shares a single stable device id, so the web app lists one computer
734 per machine rather than one per session.
735
736 > Note (2026-09-14): the hosted web app at app.codewhale.net sunsets in phases
737 > under the 2026-09-14 product-client decision; the native GPUI desktop app
738 > (private `codehwhale-gpui` repo, phase map in `docs/TRANSITION.md`) is the
739 > successor surface. `/rc` keeps working against the web app while it remains
740 > live.
741
742 ### What should I do when the model gets confused?
743
744 Stop and restate the goal, constraints, and current evidence. If the transcript
745 is long, use `/compact` or start a fresh session with a short handoff. If the
746 problem is operational, run `codewhale doctor` and inspect the reported config
747 and provider state.
748
749 ### Should I put project rules in prompts or files?
750
751 Use repository files for durable project rules and prompts for turn-specific
752 intent. If a workflow repeats across projects, consider turning it into a
753 skill.
754
755 ### Can Codewhale edit files outside the current repository?
756
757 That depends on workspace boundaries, sandbox settings, trust mode, and
758 approval policy. For contribution work, keep instructions scoped to the current
759 repository unless you intentionally need something else.
760
761 ### Where should I go after this guide?
762
763 Read the focused reference for the thing you are changing. For most users, the
764 next pages are install, configuration, providers, modes, keybindings, tools,
765 and sub-agents.
766
767 Next: [INSTALL.md](INSTALL.md), [CONFIGURATION.md](CONFIGURATION.md),
768 [PROVIDERS.md](PROVIDERS.md), [MODES.md](MODES.md), and
769 [TOOL_SURFACE.md](TOOL_SURFACE.md).
770
770 lines MARKDOWN