Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/cli/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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$)/,
Expand All @@ -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. */
Expand Down
1 change: 1 addition & 0 deletions test/agent.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading