Skip to content

The agent that grows with you

test(gateway): the CLI launch-policy probe reads main's `session_id:` exit line

Teknium19b61b23174b
diff --git a/tests/gateway/fixtures/cli_launch_policy_probe.py b/tests/gateway/fixtures/cli_launch_policy_probe.py
index ba5ec527798..2563bf7b29f 100644
--- a/tests/gateway/fixtures/cli_launch_policy_probe.py
+++ b/tests/gateway/fixtures/cli_launch_policy_probe.py
@@ -112,7 +112,10 @@ def probe(tmp_path):
# contract, same as the in-process CLI), never 0.
assert result.returncode == (1 if budget else 0), result.stdout + result.stderr
if not resume:
- sessions[side] = re.search(r'Session: (\S+)', result.stderr).group(1)
+ # Main's `-q -Q` exit line (cli_single_query): `session_id: <sid>` on stderr.
+ found = re.search(r'^session_id: (\S+)$', result.stderr, re.MULTILINE)
+ assert found, result.stderr
+ sessions[side] = found.group(1)
return result.stdout
async def unauthorized(desc):