# Identity and safety in the Gitea issue agent ## Two identities, one Gitea server The setup has two Gitea users that should remain separate: | Identity | Token stored in | Used for | What it posts | | --- | --- | --- | --- | | **Service-bruger** (e.g. `hermes-issues`) | `GITEA_TOKEN` in `~/.hermes/.env` | All plugin tool calls: scan, comment, create PR | Comments and PRs attributed to the bot | | **Personal user** (e.g. `dennis`) | `tea` login + `~/.netrc` | Local `git push` of branches the agent created | Commits and merges attributed to you | The plugin's `gitea_agent_status` reports `authenticated_user`. If it reports your personal login, the bot will post comments as you — fix the `GITEA_TOKEN` before scheduling any cron job. ## Why the Hermes safety-guards exist (and why the agent can't bypass them) Hermes has three layers of "agent cannot edit" protection, all by design: 1. **`~/.hermes/config.yaml`** — gates plugin load, model selection, toolsets, gateway config. An agent that could rewrite this could give itself new tools, change providers, or open outbound network channels. The `patch` tool explicitly refuses: `Refusing to write to Hermes config file: ... Agent cannot modify security-sensitive configuration.` 2. **`~/.hermes/.env`** — contains API keys, tokens, passwords. The `write_file`, `patch`, and `execute_code` tools all refuse to modify it. 3. **`execute_code` with file writes** — when a script is going to write files under `~/.hermes/`, the safety guard blocks it unconditionally: `BLOCKED: execute_code script timed out without user response.` **The right move when blocked:** give the user the exact one-line edit (or `cat > file <