Hunter Bown b26f53c873 fix(tui): the footer's permission chip outranks the mode word (#5796)
* fix(tui): the footer's permission chip outranks the mode word

Founder-reported: the "full access" posture chip was missing from the
footer in operate mode.

The merged footer paints the posture lockup left-to-right and drops any
chip that would run past the left block's edge, so the *last* chip was
always the first casualty — and the order was [mode, permission]. Operate
mode made it reproducible rather than occasional: `operate` is the longest
of the three mode words, so it consumed the cells `full access` needed and
the footer silently stopped reporting that the session could write
anywhere.

A preference word must not outbid a safety fact. When only one chip fits,
permission keeps the cells; painting order stays mode-then-permission so
the lockup does not shift when both fit.

Regression test sweeps widths 40..=120 and asserts no width keeps the mode
word while shedding permission. Without the fix it fails at width 69 — an
ordinary split-pane width, not a degenerate one.

tui footer_: 33 passed; 0 failed (existing posture and golden tests
included, no golden drift). cargo fmt --check clean.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LmeqaZAesoHjT8N9PR7S2c

* docs(agents): code first, then tests

Founder rule, 2026-09-01. The implementation is written and proven to run
first; tests are added afterward to cover what was actually built. No TDD
here, and this overrides any skill or default that mandates it (superpowers
`test-driven-development` in particular). An existing test that only encodes
old behavior is evidence, not a veto.

Placed beside the existing selective-evidence policy it extends, and scoped
so it does not cancel the "Claiming a test passed" rule: a regression test
written after a fix still has to be shown failing without it. That rule is
what makes an after-the-fact test worth keeping, and it is the only part of
test-first discipline that was ever earning its cost.

No conflicting TDD mandate exists in the scoped crate guidance (checked
crates/*/AGENTS.md and docs/).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LmeqaZAesoHjT8N9PR7S2c

---------

Co-authored-by: CodeWhale Bot <bot@codewhale.net>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-01 12:23:24 -07:00

Codewhale

Codewhale is an open source coding agent for your terminal, built in Rust and improved in public with the people who use it.

Codewhale running in a terminal

简体中文 · 日本語 · Tiếng Việt · Bahasa Indonesia · 한국어 · Español · Português · Русский · Українська · Français · Deutsch · 繁體中文 · हिन्दी · Türkçe · Italiano · Polski · العربية · Català

CI crates.io npm Discord

Install

npm install -g codewhale
codewhale

The first run helps you connect a provider or stay offline. Codewhale also supports Cargo, Docker, Nix, Scoop, prebuilt archives, Android/Termux, and a CNB mirror. See the installation guide.

Tab completion is one command per shell — codewhale completion bash|zsh|fish|powershell|elvish. See shell completions.

Use

Talk to Codewhale the same way you would talk to a teammate:

Fix the failing tests and explain what changed.

Or run a task without opening the TUI:

codewhale exec "fix the failing tests and explain what changed"

Codewhale can read your repository, edit files, run commands, inspect results, and keep working toward a goal. You decide how much access it has.

Why Codewhale

  • Use the model you want. Connect hosted providers or local models through Ollama, vLLM, or SGLang. Switch provider and model with /model.
  • Stay in control. Plan is read-only. Ask, Auto-Review, and Full Access make approval behavior visible. /undo reverts the last turn and /restore returns the workspace to an earlier snapshot.
  • Keep long work organized. Save sessions, set a durable /goal, review workflows before they run, and coordinate agents without turning their internal instructions into your transcript.
  • Extend the agent you already have. Connect MCP servers and skills, configure hooks, and keep agent roles as readable files in your project or personal settings.

Run /help in the TUI for commands and keyboard shortcuts.

Safety

Codewhale runs on your machine with the access you grant it. Approval modes and repository rules limit what the agent may do; optional OS sandboxing adds a stronger execution boundary where supported. Unknown model prices stay unknown instead of being reported as free.

Read authorization order for the exact policy stack and configuration for local settings.

Documentation

Join the community

Codewhale gets better when people use it, report what feels wrong, and help fix it. If a provider is missing, a workflow is awkward, or the terminal UI gets in your way, open an issue. If you know how to improve it, open a pull request. First contributions are welcome, and contributors keep credit for the work that lands.

Join the Discord, or add Hunter on WeChat (hunterbown) and ask to join the Whale Brothers group.

Project history

Codewhale began as deepseek-tui and still preserves that configuration and session compatibility. It is now provider-neutral and independently maintained; it is not affiliated with any model provider.

Thanks to every contributor and to the open source communities that helped the project grow. See the contributor record.

License

MIT. Portions adapted from other open-source projects are recorded in third-party notices.

Description
面向 DeepSeek V4 的终端原生编程智能体:100 万 token 上下文、思考模式流式推理、前缀缓存感知。自包含 Rust 二进制发布——开箱即带 MCP 客户端、沙箱和持久化任务队列
Readme MIT 378 MiB
Languages
Rust 92.9%
TypeScript 3.2%
JavaScript 1.7%
Python 1%
Shell 0.7%
Other 0.3%