diff --git a/src/cli/agent.ts b/src/cli/agent.ts index e83af69a..8f833bfa 100644 --- a/src/cli/agent.ts +++ b/src/cli/agent.ts @@ -206,8 +206,8 @@ export class AgentInputError extends Error {} * state and credentials, other keys, and secret-manager tokens. Without them * the agent neither reuses the session's account nor acts as its sub-session. * A launch from inside a `quest gate` command does not admit the agent's own - * expensive commands, so the gate's mark is dropped too. Each CLI keeps the - * user's configuration directory. + * expensive commands, so the gate's mark is dropped too, as is the base a land + * check runs against. Each CLI keeps the user's configuration directory. */ const STRIPPED = [ /^CLAUDE(?!_CONFIG_DIR$)/, @@ -217,6 +217,7 @@ const STRIPPED = [ /^OP_/, /^QUEST_API_KEYS$/, /^QUEST_GATE_ADMITTED$/, + /^QUEST_LAND_BASE$/, ]; /** The agent's environment: the user's, minus `STRIPPED`, plus its one key. */ diff --git a/test/agent.test.ts b/test/agent.test.ts index da75f50d..0296fd1e 100644 --- a/test/agent.test.ts +++ b/test/agent.test.ts @@ -248,6 +248,7 @@ test("the agent environment holds only its own key", () => { ANTHROPIC_BASE_URL: "https://proxy", QUEST_API_KEYS: "a b", QUEST_GATE_ADMITTED: "1", + QUEST_LAND_BASE: "0123456789abcdef0123456789abcdef01234567", OP_SERVICE_ACCOUNT_TOKEN: "t", OP_SESSION_me: "s", OPENAI_API_KEY: "o",