Skip to content

The agent that grows with you

fix(gateway): declare cwd_explicit on the session.create contract

Hermes Agent66bc2597121a
diff --git a/apps/shared/src/gateway-contract.generated.ts b/apps/shared/src/gateway-contract.generated.ts
index 392a71bc523..a91142764b1 100644
--- a/apps/shared/src/gateway-contract.generated.ts
+++ b/apps/shared/src/gateway-contract.generated.ts
@@ -2762,6 +2762,7 @@ export interface SessionCreateParams {
cols?: number | null
source?: string | null
cwd?: string | null
+ cwd_explicit?: boolean | null
messages?: SeedMessage[] | null
parent_session_id?: string | null
title?: string | null
diff --git a/apps/shared/src/gateway-contract.openrpc.json b/apps/shared/src/gateway-contract.openrpc.json
index 6b1374a20f3..f922bcb5552 100644
--- a/apps/shared/src/gateway-contract.openrpc.json
+++ b/apps/shared/src/gateway-contract.openrpc.json
@@ -28659,6 +28659,18 @@
"default": null,
"title": "Cwd"
},
+ "cwd_explicit": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Cwd Explicit"
+ },
"messages": {
"anyOf": [
{
diff --git a/tui_gateway/contracts/sessions.py b/tui_gateway/contracts/sessions.py
index d2c1809cbda..be298aebf74 100644
--- a/tui_gateway/contracts/sessions.py
+++ b/tui_gateway/contracts/sessions.py
@@ -119,6 +119,9 @@ class SessionCreateParams(ProfileParams):
cols: int | None = None
source: str | None = None
cwd: str | None = None
+ # #52589: provenance for ``cwd`` — true only for a deliberate workspace pick;
+ # an inherited app-global workspace must yield to a named profile's terminal.cwd.
+ cwd_explicit: bool | None = None
messages: list[SeedMessage] | None = None
parent_session_id: str | None = None
title: str | None = None