Safety

How madtea keeps the token out of argv, history, and errors, and how its write-side guards fail closed.

DocWhat it covers
credential-safety.mdThe threat model and the storage backends that keep the token out of argv, history, and errors.
safe-body-edits.mdAnchored, optimistic-locked edits that can’t trample an issue or PR body.
safety-hooks.mdThe seven Claude-Code-only bash hooks that steer agents away from credential-leaking raw git.
wrong-repo-protection.mdThe fail-closed guard that refuses an MCP write to the wrong repo in a multi-repo workspace, and how MADTEA_CALLER_REPO / owner_repo make it reliable.

Part of the madtea documentation tree.

  • Credential Safety How madtea stores your Forgejo/Gitea token locally and what the “credential-safe git wrappers” claim actually guarantees.
  • Safe body edits madtea has no command that overwrites an issue body or pull-request body wholesale.
  • Safety hooks The Claude Code plugin installs seven PreToolUse hooks that intercept tool calls before they run — they don’t change git itself, only what the agent is permitted to run.
  • Wrong-repo fail-closed guard A repo-scoped MCP tool called without an explicit owner_repo resolves its target repo from the MCP server process’s working directory — not from any cd the agent did.