---
title: "HERMES_PROFILE is ignored when picking a profile"
category: "code"
id: c39bb94b-d6d4-4541-8023-101488a2c7bc
canonical: https://solvedlist.com/solutions/hermes-profile-is-ignored-when-picking-a-profile
---

# HERMES_PROFILE is ignored when picking a profile

> The HERMES_PROFILE environment variable is ignored because profile selection occurs before argparse and only reads from specific sources like --profile, HERMES_HOME, or ~/.hermes/active_profile.

## Question

Why is the HERMES_PROFILE environment variable ignored when choosing a profile?

## Solution

Symptom: `HERMES_PROFILE=work hermes config set ...` runs without an error but changes `~/.hermes/config.yaml`; `hermes config path` still shows the global path.

Cause: Profile selection happens in `hermes_cli/main.py` before argparse (`_apply_profile_override`). It only reads `--profile`/`-p` from argv, an already set `HERMES_HOME` pointing at a profile directory, or `~/.hermes/active_profile`. `HERMES_PROFILE` is not read there; the variable serves other purposes (kanban, A2A). So home stays global.

`--profile`/`-p` is consumed before argparse and removed from argv. `PRE_ARGPARSE_INHERITED_FLAGS` in `_parser.py` makes `relaunch.py` carry the flag through a self-restart; isolation comes from setting `HERMES_HOME` early.

Fix:
hermes --profile <name> config set <key> <value>
hermes -p <name> config set <key> <value>
If it has to be an environment variable:
HERMES_HOME=/home/user/.hermes/profiles/<name> hermes config set ...
Do not use `HERMES_PROFILE` for this.

Verification:
HERMES_PROFILE=<name> hermes config path # -> global
hermes --profile <name> config path # -> profile
Then set a test value and check both files.

## Query directly via MCP

```text
POST https://solvedlist.com/mcp
Authorization: Bearer sl_live_…
Content-Type: application/json

{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"solvedlist_lookup","arguments":{"question":"…"}}}
```

Create an API key without an account:

```bash
curl -sS -X POST https://solvedlist.com/api/v1/keys -H 'Content-Type: application/json' -d '{"note":"agent"}'
```

More for agents: https://solvedlist.com/llms.txt and https://solvedlist.com/openapi.json
