Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

feat(signals): make scout notebook write a per-scout grant, on by default (#117215)

posthog[bot]c790e497ddee
diff --git a/frontend/snapshots.yml b/frontend/snapshots.yml
index 29c70944cc53..2ea91c9fdaa4 100644
--- a/frontend/snapshots.yml
+++ b/frontend/snapshots.yml
@@ -11839,29 +11839,29 @@ snapshots:
scenes-app-inbox-scoutwriteaccesstag--granted--light:
hash: v1.k794b7964.f43a37d7ad168d1f8b879e6361bf0cf88f1c492e176567a24f8919f7281cff27.WDlRZQnnmsRUqVgEm4VItfi-i3Dq86esxOUoRJ35jds
scenes-app-inbox-scoutwritescopespicker--cannot-edit--dark:
- hash: v1.k794b7964.433e6214c41a90f8bd47c8acba6a51e7f993c3a5d8a13be705c0aba38e101f60.5N_rTTGonjdCbh2zp1t2L8rwB96PO9IzkZi99NQySgs
+ hash: v1.k794b7964.01d5561fce427e6c31c84791b1b45b327697fb9846c1ed21fb9e9815c967477b.k5eM-bFa0xfYI9IjMyegZ9p2vIPbrsoC8RRzHoTNnz4
scenes-app-inbox-scoutwritescopespicker--cannot-edit--light:
- hash: v1.k794b7964.6188683982545cdaef046bc19f47d8aeb9cb4512a839e3280e3610d60006b6a6.R0sfF9d4uXvXrHi63ROjPZtLM8nkXd6Ix80MGtmcVYk
+ hash: v1.k794b7964.b4d1678276068a7b10b2ca34e0f8c0ffe2c4f41540c0069202d699376f1f006c.YRAfBONeGtnnnp7p_YlTbbvuQT5tJZzl18-N4_HJwg0
scenes-app-inbox-scoutwritescopespicker--maintainer-scout--dark:
- hash: v1.k794b7964.0e24bea373ccfb2b68b860a62ed0a6e2d625295971af60aeabb58ce6622fac34.mHutYjWSTdS4P9MGen2xf90sPgvt_U7WL9IIE40DAz4
+ hash: v1.k794b7964.34025711f0fc4e7fa7b5d27e0f87c9a6c6b093a5192cc5ca3d7dde087f08c5de.KjtVTX--aKb8fcKSY71at5og0RLYz6Gd7p1rmITXDGU
scenes-app-inbox-scoutwritescopespicker--maintainer-scout--light:
- hash: v1.k794b7964.c9cc5808ab0739d24fcb5dfd0fea0fcedbfa23c841920e81a2a58a85b4a2a897.DePTNM1f0iaSaItXQZSCzhn9pDBDBBq8KEBPiQewcEQ
+ hash: v1.k794b7964.c52bbdc7f57d328633da1664fa30c460bfa3d7f0255e049a64a16396df4633bc.KPGixJSLfrp6aw-zFj47FjMWGPoUjHU7t8-PgZetCv8
scenes-app-inbox-scoutwritescopespicker--read-only-scout--dark:
- hash: v1.k794b7964.7a2237e57de7be145a1efdf99026ee37fef4e15c0380133352c82f3f1460e363.rZXmwpSRrkF8RUORpH3ifHp7Wab-PAO49XqlxvW4Bo0
+ hash: v1.k794b7964.26c6e3591196c16156e403336f41aacee8bedc4b0ff947386b44db4466060fe3.P69Sg8WauZh0s9_Aj-n4_mcPKyVOJqhsZfqtkLj4a44
scenes-app-inbox-scoutwritescopespicker--read-only-scout--light:
- hash: v1.k794b7964.cd7a30f160b35785c14dfa96103192ba640f2d8c562b130805b428e80e00cd10.OXmmiUadtDMbIQSsUloOVB91vO4n-nph3OUr0My0g9k
+ hash: v1.k794b7964.b0b2ac7f15ecec89e798677e14008ae1c5eaeccb24f79a947840006e2df96174.WC3iDKF5OVCBjtEVbihkUSMsDcc3JdVfdf9Y8n4Z1so
scenes-app-inbox-scoutwritescopespicker--scanner-maintainer-scout--dark:
- hash: v1.k794b7964.f81449d66fe6362a59a4602d17eaab18453edf5129f0c990bc790a7c8d70b45a.79EI1uVMq0WWuFQoswzKKgIInlvlSNhnqsYuGjDiLBI
+ hash: v1.k794b7964.ccbc3de37de1039045748bc3a163853085b389ddfe347b0db90f2b343b2133ad.GQGozX-3C0Iy3Fb_uLCMoWLNMKeE0rEOJi5KJVKTSlI
scenes-app-inbox-scoutwritescopespicker--scanner-maintainer-scout--light:
- hash: v1.k794b7964.b8f8e6f6a97da5a9bbd9b843c1046eed48ac92f095323f0aedde670a313db702.YWhU5bf0PuUIqN8c7AEfhSL39BSY1LgifQ-zXueRlqQ
+ hash: v1.k794b7964.c04e749d57d561d5949a6e4300b7dc0c9d5fa7a0989a8996b97ce64d69a2147f.EJac7h3BEm9dTDyY7t07k6Le_5fLIQcyD7w6q_IWGZc
scenes-app-inbox-scoutwritescopespicker--scout-settings-variant--dark:
- hash: v1.k794b7964.cff8e6534b89cb0073e2792c013ee16b7bf5211e09cd94c53b23f1d6d6c3c99f.ZmR16J_3a47GOoisBs8RAxLD90XSR0yYzYbp-cGD2zU
+ hash: v1.k794b7964.aad362b822bb26c5f709d14dd6867b69072d7592a3fedfb7e7ef8c02974d247c.VAsdkTkqgpcOsFlvlv3X9-TBMZ-GiB8Xh6hwcpZtvhY
scenes-app-inbox-scoutwritescopespicker--scout-settings-variant--light:
- hash: v1.k794b7964.3a22578e239c9f5e5d5e9d8083d1b432902f8d36bb028c88544d81b0e1ea1a71.OlmpkBt_1PtHr2JP6QdwJ5ot5z0PaTxn3MWCoWJ3sKQ
+ hash: v1.k794b7964.fb971edb38f4fb81f15341de2cad11d7a8d28e282ef6f4170b88c30bdd1a8876.khp5L1VMzvabJEUrdpydvfZ_kU1dOgU5HdjINBmRK3s
scenes-app-inbox-scoutwritescopespicker--with-granted-scopes--dark:
- hash: v1.k794b7964.b31c54f21c1548fdf1c54e5c50fde118ee9cb0461319282a091311dbd1bd4bf4.xsTv2sDUXWsrD1TZ3orAUx0k0M0_aAtN6N2cx5igq8o
+ hash: v1.k794b7964.624979de3d9e955679d649456caa39bb65b2569c8bbe8e64c4513b1ac0602c96.MCU5dT2-2wOqnjTlNXMbv5_rZ9d7HPIN_OfyrvuTaYU
scenes-app-inbox-scoutwritescopespicker--with-granted-scopes--light:
- hash: v1.k794b7964.5f47e7d391b14647749f5d5db7c5d1db5d3719918c77dd414452e651fbc330b3.WPJzR_xzpJM0JsLVq1IDh2cvs6VnHKh-cOXttAH_vv8
+ hash: v1.k794b7964.b8f03bd767f60a0683d5a0d86832550103f841990ed13063cd2810b991a9ada7.h6RI1wa6AxQOSUa3TL1WRokQoE5b7qRaJTip6w5qT2g
scenes-app-inbox-selfdrivingsection--daily-limit-reached--dark:
hash: v1.k794b7964.4a44499b80e3b4929fae54d29924187253c3d56de5d4931e048e2d40f2a8fdbf._pm2YuKeybVX5dJoTbJTx9020tKZ9pl-Ygpdj5qX8jY
scenes-app-inbox-selfdrivingsection--daily-limit-reached--light:
diff --git a/posthog/management/migration_analysis/atomic_false_acknowledged_migrations.txt b/posthog/management/migration_analysis/atomic_false_acknowledged_migrations.txt
index 4122fc2f3f57..b706ed97df5a 100644
--- a/posthog/management/migration_analysis/atomic_false_acknowledged_migrations.txt
+++ b/posthog/management/migration_analysis/atomic_false_acknowledged_migrations.txt
@@ -46,6 +46,9 @@ posthog.1370_backfill_taggeditem_generic_pointer
# selects reports that still hold no cached judgment, and each value is recomputed from the
# artefact log.
signals.0154_backfill_report_actionability
+# Adds notebook:write to scout config grants in id-ordered batches, so no single transaction locks
+# every config. Re-running is a no-op: a config that already holds the scope is skipped.
+signals.0177_backfill_scout_notebook_write
# Drops the 13 legacy tagged item foreign keys one per transaction, so each drop locks one busy parent and
# the child instead of all 14 tables at once. Re-running is a no-op: DropForeignKey reads what is left from pg_constraint.
posthog.1383_taggeditem_untrack_legacy_keys
diff --git a/posthog/temporal/oauth.py b/posthog/temporal/oauth.py
index 3c35263c62d0..70b08e06efaf 100644
--- a/posthog/temporal/oauth.py
+++ b/posthog/temporal/oauth.py
@@ -169,29 +169,10 @@ SCOUT_REPORT_SCOPES: list[str] = [
CONTEXT_LAYER_INTERNAL_SCOPE = "context_layer_internal:write"
-# A deliberately narrow set of user-facing WRITE scopes granted to the Signals scout
-# sandbox so scouts can produce durable artifacts as part of a finding — e.g. a notebook
-# that documents and illustrates an emitted anomaly. Unlike `SCOUT_INTERNAL_SCOPES` these
-# are ordinary public scopes (also present in the `full` preset), but they are added to the
-# scout posture ONLY on the `signals_scout` branch below, never via the global
-# `INTERNAL_SCOPES`, so `read_only` task tokens stay strictly read-only. Keep this list
-# small: every entry is real write access an autonomous scout can exercise unattended, so
-# add a scope here only when a scout genuinely needs to create that kind of artifact.
-# NOTE: scopes here are object-level, not tool-level. `notebook:write` also exposes the
-# `notebooks-destroy` / `notebooks-partial-update` MCP tools, not just `notebooks-create`,
-# so in principle a scout (or a prompt-injected run) could modify or soft-delete existing
-# notebooks in its own project. Accepted as low-risk for now — the token is scoped to a
-# single team, destroy is a recoverable soft-delete, and emits are rare — and monitored in
-# practice; tool-level (create-only) restriction isn't cheap in the current sandbox wiring.
-SCOUT_USER_WRITE_SCOPES: list[str] = [
- "notebook:write",
-]
-
-
# The user-facing WRITE scopes a person may grant to ONE scout from its settings, on top of
-# the fixed posture above. `SCOUT_USER_WRITE_SCOPES` is the fleet-wide floor every scout
-# carries; this set is the ceiling of what a per-scout grant can add to it. Nothing here is
-# granted by default, and a scope outside this set can never be granted at all: a grant is
+# the fixed posture above. The fixed posture carries no user-facing write scope, so this set is
+# the ceiling of everything a scout can change in the project. Only `SCOUT_DEFAULT_WRITE_SCOPES`
+# is granted by default, and a scope outside this set can never be granted at all: a grant is
# validated against this set where it is stored, and `resolve_scopes` intersects against it
# again at mint time, so a stale or hand-edited grant cannot widen a token.
#
@@ -205,6 +186,11 @@ SCOUT_USER_WRITE_SCOPES: list[str] = [
# every matching object the token can reach, not only the objects the scout created. The reach
# is not the same for all of them, and any surface that offers a grant has to say so plainly:
#
+# notebook:write Every notebook in the scout's project, not only the ones the scout
+# created: the `notebooks-*` write tools create, edit, run, and delete.
+# Delete is a recoverable soft-delete. Granted by default (see
+# `SCOUT_DEFAULT_WRITE_SCOPES`), so a finding can carry a notebook that
+# documents it.
# dashboard:write Every dashboard in the scout's project. Delete is a recoverable
# soft-delete.
# insight:write Every saved insight in the scout's project. Delete is a recoverable
@@ -281,6 +267,7 @@ SCOUT_GRANTABLE_INTERNAL_SCOPES: frozenset[str] = frozenset({"hog_flow_proposal:
SCOUT_GRANTABLE_WRITE_SCOPES: frozenset[str] = frozenset(
{
+ "notebook:write",
"dashboard:write",
"insight:write",
"annotation:write",
@@ -295,6 +282,11 @@ SCOUT_GRANTABLE_WRITE_SCOPES: frozenset[str] = frozenset(
}
)
+# The grant every new scout config starts with. A person can turn it off for one scout. Unlike the
+# rest of a grant, a run that acts as the team fallback keeps these scopes, because the fleet granted
+# them and not a person, so the fallback bypasses no approval.
+SCOUT_DEFAULT_WRITE_SCOPES: frozenset[str] = frozenset({"notebook:write"})
+
# Derived from posthog.scopes so the token issued to a sandboxed agent cannot
# drift out of subset of what the MCP server advertises in
@@ -469,13 +461,13 @@ def resolve_scopes(
)
resolved = [*reads, *private_writes]
elif scopes in SCOUT_SCOPE_PRESETS:
- # The scout sandbox: reads, the scout's own internal write scope, and a narrow
- # allowlist of user-facing writes (`SCOUT_USER_WRITE_SCOPES`) for the durable
- # artifacts a finding can produce (e.g. a notebook). Both extra sets are added
- # ONLY here (not via the global `INTERNAL_SCOPES`), so unrelated `full`/`read_only`
- # task tokens never carry them. `has_write_scopes(...)` also reports True so the MCP
- # server doesn't enable read-only mode, which would otherwise strip the agent's own
- # internal-write tools (`signal_scout_internal:write` is annotated as not-read-only).
+ # The scout sandbox: reads and the scout's own internal write scope. Every user-facing
+ # write, notebooks included, comes from the per-scout grant on the posture dict above.
+ # The internal scope is added ONLY here (not via the global `INTERNAL_SCOPES`), so
+ # unrelated `full`/`read_only` task tokens never carry it. `has_write_scopes(...)`
+ # also reports True so the MCP server doesn't enable read-only mode, which would
+ # otherwise strip the agent's own internal-write tools (`signal_scout_internal:write`
+ # is annotated as not-read-only).
#
# `signals_scout_reports` is the same posture plus the report-channel scope, granted
# only to a scout whose skill opted into emit_report/edit_report. A baseline scout
@@ -484,7 +476,7 @@ def resolve_scopes(
scout_report = (
list(SCOUT_REPORT_SCOPES) if (scopes == "signals_scout_reports" and include_internal_scopes) else []
)
- resolved = [*MCP_READ_SCOPES, *internal, *scout_internal, *scout_report, *SCOUT_USER_WRITE_SCOPES]
+ resolved = [*MCP_READ_SCOPES, *internal, *scout_internal, *scout_report]
else:
# "read_only": reads + shared internal scopes only — no scout write scope.
resolved = [*MCP_READ_SCOPES, *internal]
@@ -506,7 +498,7 @@ def has_write_scopes(scopes: PosthogMcpScopes) -> bool:
if isinstance(scopes, str):
# `signals_scout` reports True so the MCP server doesn't enable read-only mode for the
# scout sandbox — the agent IS allowed to call the write tools its preset exists for
- # (remember/forget/emit_finding + the narrow `SCOUT_USER_WRITE_SCOPES`). Read-only mode
+ # (remember/forget/emit_finding, plus whatever the per-scout grant adds). Read-only mode
# is a tool-annotation filter, not a scope filter, and would strip those tools
# categorically without this opt-out. The two pipeline postures need the same opt-out
# for their scratchpad tools; `signals_research` pays for it by withholding `task:write`
diff --git a/posthog/temporal/tests/test_oauth.py b/posthog/temporal/tests/test_oauth.py
index 057b78aea6ab..064b68e3fbca 100644
--- a/posthog/temporal/tests/test_oauth.py
+++ b/posthog/temporal/tests/test_oauth.py
@@ -21,11 +21,11 @@ from posthog.temporal.oauth import (
MCP_WRITE_SCOPES,
POSTHOG_AI_APP_CLIENT_ID_DEV,
RESEARCH_WITHHELD_SCOPES,
+ SCOUT_DEFAULT_WRITE_SCOPES,
SCOUT_GRANTABLE_INTERNAL_SCOPES,
SCOUT_GRANTABLE_WRITE_SCOPES,
SCOUT_INTERNAL_SCOPES,
SCOUT_SCOPE_PRESETS,
- SCOUT_USER_WRITE_SCOPES,
SCRATCHPAD_INTERNAL_SCOPES,
McpScopePreset,
PosthogMcpScopes,
@@ -64,13 +64,12 @@ class TestResolveScopes(SimpleTestCase):
assert CONTEXT_LAYER_INTERNAL_SCOPE in resolve_scopes(["organization:write"])
def test_signals_scout_preset_adds_scout_internal_write(self) -> None:
- # `signals_scout` = `read_only` content PLUS the scout's own internal write scope
- # PLUS the narrow user-facing write allowlist (`SCOUT_USER_WRITE_SCOPES`). No other
- # user-facing write scopes (e.g. `action:write`) leak in.
+ # `signals_scout` = `read_only` content PLUS the scout's own internal write scope, and no
+ # user-facing write scope. Notebooks included: a scout holds `notebook:write` only through
+ # its grant, so a person can turn it off for one scout.
result = resolve_scopes("signals_scout")
- assert set(result) == set(MCP_READ_SCOPES + INTERNAL_SCOPES + SCOUT_INTERNAL_SCOPES + SCOUT_USER_WRITE_SCOPES)
+ assert set(result) == set(MCP_READ_SCOPES + INTERNAL_SCOPES + SCOUT_INTERNAL_SCOPES)
assert "signal_scout_internal:write" in result
- assert "notebook:write" in result
assert "action:write" not in result
def test_scout_internal_write_only_on_signals_scout_preset(self) -> None:
@@ -134,30 +133,10 @@ class TestResolveScopes(SimpleTestCase):
assert "signal_scratchpad_internal:write" not in resolve_scopes(preset)
assert "signal_scratchpad_internal:write" not in resolve_scopes(["feature_flag:read"])
- @parameterized.expand([(scope,) for scope in SCOUT_USER_WRITE_SCOPES])
- def test_scout_user_write_allowlist_isolated_from_read_only_tokens(self, scope: str) -> None:
- # The scout's user-facing write allowlist (e.g. `notebook:write`) must reach the
- # `signals_scout` preset but NOT leak onto read-only task tokens. It legitimately
- # appears in `full` (which carries every MCP write scope) — that is expected and is
- # not what this invariant guards.
- assert scope in resolve_scopes("signals_scout")
- assert scope not in resolve_scopes("read_only")
- assert scope not in resolve_scopes(["feature_flag:read"])
-
- def test_signals_scout_user_write_allowlist_ignores_internal_scopes_flag(self) -> None:
- # `SCOUT_USER_WRITE_SCOPES` are ordinary public scopes, not internal ones, so they
- # are granted to the scout posture independently of `include_internal_scopes`.
- # Dropping internal scopes still strips the scout's own internal write scope.
- result = resolve_scopes("signals_scout", include_internal_scopes=False)
- assert set(result) == set(MCP_READ_SCOPES + SCOUT_USER_WRITE_SCOPES)
- assert "notebook:write" in result
- assert "signal_scout_internal:write" not in result
- for scope in INTERNAL_SCOPES:
- assert scope not in result
-
@parameterized.expand(
[
("dashboard_grant", "signals_scout", "dashboard:write", "insight:write"),
+ ("notebook_grant", "signals_scout", "notebook:write", "dashboard:write"),
# The skills grant is the one whose object the scout machinery itself runs on: a custom
# scout is a skill, and the report preset carries the scout's own internal and emit
# scopes. This case is what proves a grant on it composes with that preset rather than
@@ -304,6 +283,8 @@ class TestResolveScopes(SimpleTestCase):
# A typo would offer a person a switch that grants nothing. An internal scope is allowed only
# where it is listed as deliberately grantable, since those are minted server-side.
assert SCOUT_GRANTABLE_WRITE_SCOPES <= set(MCP_WRITE_SCOPES) | SCOUT_GRANTABLE_INTERNAL_SCOPES
+ # A default outside the allowlist would be stored on every new scout and dropped at mint time.
+ assert SCOUT_DEFAULT_WRITE_SCOPES <= SCOUT_GRANTABLE_WRITE_SCOPES
def test_custom_scopes(self) -> None:
custom = ["feature_flag:read", "feature_flag:write"]
diff --git a/products/replay_vision/frontend/generated/api.schemas.ts b/products/replay_vision/frontend/generated/api.schemas.ts
index 75adac48e378..d37a0dbf66c4 100644
--- a/products/replay_vision/frontend/generated/api.schemas.ts
+++ b/products/replay_vision/frontend/generated/api.schemas.ts
@@ -2091,8 +2091,8 @@ export interface SignalScoutConfigOptionsApi {
*/
repositories?: string[]
/**
- * Extra write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. Empty (the default) means the scout reads the project and writes only what every scout may write: notebooks, its findings, and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant. Applies from the scout's next run.
- * @maxItems 11
+ * Write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `notebook:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. A new scout starts with `notebook:write` when this field is omitted. Empty means the scout reads the project and writes only its findings and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant, and a run that acts as a project member other than the author holds only the default scopes. Applies from the scout's next run.
+ * @maxItems 12
*/
write_scopes?: string[]
/** Opt-in guard on this scout's lifecycle. Off by default, so anyone with scout write access may pause, resume, switch the scout to dry run, or delete it. On, only the person the scout's runs act as or a project admin may do any of those, or change this flag. Use it on a scout whose output people depend on: `signal_scout:write` is a project-wide scope held by people and by unattended agents alike, and a resume has to pass the project's enabled-scout maximum that a pause does not, so a bulk pause is not undone in one step. The lock never stops an automatic pause, such as the inactivity sweep or the repeated-failure breaker. */
@@ -2371,8 +2371,8 @@ export interface SignalScoutConfigApi {
*/
repositories?: string[]
/**
- * Extra write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. Empty (the default) means the scout reads the project and writes only what every scout may write: notebooks, its findings, and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant. Applies from the scout's next run.
- * @maxItems 11
+ * Write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `notebook:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. A new scout starts with `notebook:write` when this field is omitted. Empty means the scout reads the project and writes only its findings and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant, and a run that acts as a project member other than the author holds only the default scopes. Applies from the scout's next run.
+ * @maxItems 12
*/
readonly write_scopes: readonly string[]
/** Opt-in guard on this scout's lifecycle. Off by default, so anyone with scout write access may pause, resume, switch the scout to dry run, or delete it. On, only the person the scout's runs act as or a project admin may do any of those, or change this flag. Use it on a scout whose output people depend on: `signal_scout:write` is a project-wide scope held by people and by unattended agents alike, and a resume has to pass the project's enabled-scout maximum that a pause does not, so a bulk pause is not undone in one step. The lock never stops an automatic pause, such as the inactivity sweep or the repeated-failure breaker. */
diff --git a/products/replay_vision/frontend/generated/api.zod.ts b/products/replay_vision/frontend/generated/api.zod.ts
index abec59022cec..418aa903aaff 100644
--- a/products/replay_vision/frontend/generated/api.zod.ts
+++ b/products/replay_vision/frontend/generated/api.zod.ts
@@ -1046,7 +1046,7 @@ export const visionScannersScoutsCreateBodyConfigOneRepositoriesItemMax = 255
export const visionScannersScoutsCreateBodyConfigOneRepositoriesMax = 10
-export const visionScannersScoutsCreateBodyConfigOneWriteScopesMax = 11
+export const visionScannersScoutsCreateBodyConfigOneWriteScopesMax = 12
export const visionScannersScoutsCreateBodyConfigOnePrecheckQueryMax = 10000
@@ -1133,7 +1133,7 @@ export const VisionScannersScoutsCreateBody = /* @__PURE__ */ zod
.max(visionScannersScoutsCreateBodyConfigOneWriteScopesMax)
.optional()
.describe(
- "Extra write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. Empty (the default) means the scout reads the project and writes only what every scout may write: notebooks, its findings, and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant. Applies from the scout's next run."
+ "Write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `notebook:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. A new scout starts with `notebook:write` when this field is omitted. Empty means the scout reads the project and writes only its findings and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant, and a run that acts as a project member other than the author holds only the default scopes. Applies from the scout's next run."
),
lifecycle_locked: zod
.boolean()
diff --git a/products/signals/backend/facade/api.py b/products/signals/backend/facade/api.py
index 450a25d0c46d..c164c5a649bb 100644
--- a/products/signals/backend/facade/api.py
+++ b/products/signals/backend/facade/api.py
@@ -1429,14 +1429,16 @@ def enable_scout_for_product(
The project gets that one skill and an enabled config the product owns. `acting_user` becomes
the person the runs act as, because they turned the feature on. `write_scopes` is limited to
- `SCOUT_GRANTABLE_WRITE_SCOPES`. The caller must already have checked that this person may
- grant those scopes. It applies the same rules as the scout config API: the person needs editor
- access to skills, a new scout must fit the project's enabled-scout limit, and only a project
- admin or the person the runs act as may give a new scout write scopes or widen an existing grant.
+ `SCOUT_GRANTABLE_WRITE_SCOPES`, and a new scout holds them on top of `SCOUT_DEFAULT_WRITE_SCOPES`.
+ The caller must already have checked that this person may grant those scopes. It applies the
+ same rules as the scout config API: the person needs editor access to skills, a new scout must
+ fit the project's enabled-scout limit, and only a project admin or the person the runs act as
+ may give a new scout more than the default scopes or widen an existing grant.
Returns False without writing when a rule refuses, when the organization has not approved AI data processing, when the scout
is paused by a person or by the system, or when another product owns its config.
"""
from posthog.temporal.oauth import ( # noqa: PLC0415 — keeps the token module off the facade's import path
+ SCOUT_DEFAULT_WRITE_SCOPES,
SCOUT_GRANTABLE_WRITE_SCOPES,
)
@@ -1469,7 +1471,7 @@ def enable_scout_for_product(
defaults: dict[str, Any] = {
"source_product": source_product,
"enabled": True,
- "write_scopes": scopes,
+ "write_scopes": sorted(SCOUT_DEFAULT_WRITE_SCOPES | set(scopes)),
"created_by": acting_user,
"enabled_by": acting_user,
}
@@ -1486,7 +1488,7 @@ def enable_scout_for_product(
if config is None:
if enabled_scout_count(team.id, exclude_skill=skill_name) >= max_enabled_scouts:
return False
- if scopes and not _may_grant_scout_scopes(
+ if set(scopes) - SCOUT_DEFAULT_WRITE_SCOPES and not _may_grant_scout_scopes(
team=team, skill_name=skill_name, config=None, acting_user=acting_user
):
return False
diff --git a/products/signals/backend/migrations/0176_signalscoutconfig_default_notebook_write.py b/products/signals/backend/migrations/0176_signalscoutconfig_default_notebook_write.py
new file mode 100644
index 000000000000..e37291cffa17
--- /dev/null
+++ b/products/signals/backend/migrations/0176_signalscoutconfig_default_notebook_write.py
@@ -0,0 +1,20 @@
+from django.db import migrations, models
+
+import products.signals.backend.models
+
+
+class Migration(migrations.Migration):
+ dependencies = [
+ ("signals", "0175_signalteamconfig_agent_instructions"),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name="signalscoutconfig",
+ name="write_scopes",
+ field=models.JSONField(
+ db_default=[],
+ default=products.signals.backend.models.default_scout_write_scopes,
+ ),
+ ),
+ ]
diff --git a/products/signals/backend/migrations/0177_backfill_scout_notebook_write.py b/products/signals/backend/migrations/0177_backfill_scout_notebook_write.py
new file mode 100644
index 000000000000..079d4cfde111
--- /dev/null
+++ b/products/signals/backend/migrations/0177_backfill_scout_notebook_write.py
@@ -0,0 +1,93 @@
+import json
+
+from django.db import migrations
+
+BATCH_SIZE = 500
+
+NOTEBOOK_WRITE_SCOPE = "notebook:write"
+
+# The MCP tools that required `notebook:write` when this migration was written. Frozen here, because
+# what an applied migration did must not change when the live tool catalogue does.
+NOTEBOOK_WRITE_TOOLS = frozenset(
+ {
+ "notebook-edit",
+ "notebooks-add-cell",
+ "notebooks-configure-compute",
+ "notebooks-create",
+ "notebooks-create-markdown",
+ "notebooks-delete-cell",
+ "notebooks-destroy",
+ "notebooks-partial-update",
+ "notebooks-run",
+ "notebooks-run-cell",
+ "notebooks-run-cell-interrupt",
+ "notebooks-run-status",
+ "notebooks-set-variables",
+ "notebooks-widget-attach",
+ "notebooks-widget-cancel",
+ "notebooks-widget-generate",
+ }
+)
+
+
+def _with_notebook_write(write_scopes: object, allowed_mcp_tools: object) -> list[str] | None:
+ """The grant a config holds once notebooks move into it, or None to leave the row alone.
+
+ A config with a tool list derives its grant from the tools it picked, so it gains notebooks only
+ when it picked a notebook write tool. Every other config held notebooks through the fleet posture
+ and keeps them. A malformed grant granted nothing at mint time, so it becomes notebooks alone.
+ """
+ if allowed_mcp_tools is not None:
+ picked = isinstance(allowed_mcp_tools, list) and any(tool in NOTEBOOK_WRITE_TOOLS for tool in allowed_mcp_tools)
+ if not picked:
+ return None
+ held = [scope for scope in write_scopes if isinstance(scope, str)] if isinstance(write_scopes, list) else []
+ if NOTEBOOK_WRITE_SCOPE in held:
+ return None
+ return sorted({*held, NOTEBOOK_WRITE_SCOPE})
+
+
+def grant_notebook_write(apps, schema_editor):
+ """Add `notebook:write` to every existing scout's grant, so no scout loses notebooks on deploy."""
+ SignalScoutConfig = apps.get_model("signals", "SignalScoutConfig")
+ configs = SignalScoutConfig._default_manager.order_by("id")
+ cursor = None
+ while True:
+ page = configs.filter(id__gt=cursor) if cursor else configs
+ rows = list(page.values_list("id", "write_scopes", "allowed_mcp_tools")[:BATCH_SIZE])
+ if not rows:
+ return
+ cursor = rows[-1][0]
+ # Grouped by the grant read, so a batch costs one UPDATE per distinct grant rather than one
+ # per config. Most configs hold the same empty grant.
+ ids_by_grant: dict[str, tuple[object, list[str], list]] = {}
+ for config_id, write_scopes, allowed_mcp_tools in rows:
+ granted = _with_notebook_write(write_scopes, allowed_mcp_tools)
+ if granted is None:
+ continue
+ key = json.dumps(write_scopes, sort_keys=True)
+ ids_by_grant.setdefault(key, (write_scopes, granted, []))[2].append(config_id)
+ for write_scopes, granted, ids in ids_by_grant.values():
+ # `update()`, not `save()`: a backfill must not bump `updated_at` or write an activity
+ # log entry nobody made. Matching on the grant read above skips a config a person edited
+ # since, so the backfill never overwrites a newer grant.
+ SignalScoutConfig._default_manager.filter(id__in=ids, write_scopes=write_scopes).update(
+ write_scopes=granted
+ )
+
+
+class Migration(migrations.Migration):
+ # Non-atomic so each batch commits as it goes, instead of holding every config locked until the
+ # last batch is written. Safe to rerun after a partial run: a row that already holds the scope
+ # is skipped.
+ atomic = False
+
+ dependencies = [
+ ("signals", "0176_signalscoutconfig_default_notebook_write"),
+ ]
+
+ operations = [
+ # Reverse is a noop: removing the scope would take notebooks away from scouts that held
+ # them before this migration, through the fleet posture.
+ migrations.RunPython(grant_notebook_write, migrations.RunPython.noop, elidable=True),
+ ]
diff --git a/products/signals/backend/migrations/max_migration.txt b/products/signals/backend/migrations/max_migration.txt
index 4e33c20491c3..f3d02872cdd2 100644
--- a/products/signals/backend/migrations/max_migration.txt
+++ b/products/signals/backend/migrations/max_migration.txt
@@ -1 +1 @@
-0175_signalteamconfig_agent_instructions
+0177_backfill_scout_notebook_write
diff --git a/products/signals/backend/models.py b/products/signals/backend/models.py
index 38c56bdf70f6..4bfe1834a184 100644
--- a/products/signals/backend/models.py
+++ b/products/signals/backend/models.py
@@ -2439,6 +2439,14 @@ class SignalReportCheck(UUIDModel):
# - SignalScoutNote: steering notes humans/agents leave for scouts to read.
+def default_scout_write_scopes() -> list[str]:
+ from posthog.temporal.oauth import ( # noqa: PLC0415 — keeps the token module off the models import path
+ SCOUT_DEFAULT_WRITE_SCOPES,
+ )
+
+ return sorted(SCOUT_DEFAULT_WRITE_SCOPES)
+
+
class SignalScoutConfig(ModelActivityMixin, TeamScopedRootMixin, UUIDModel):
"""One row per (team, scout skill): schedule + emit posture for a scout skill.
@@ -2740,16 +2748,17 @@ class SignalScoutConfig(ModelActivityMixin, TeamScopedRootMixin, UUIDModel):
db_default=[],
blank=True,
)
- # User-facing write scopes a person granted this one scout, on top of the fleet-wide posture
- # every scout carries. Plain scope strings (`["dashboard:write", "insight:write"]`), so adding
- # a grantable object later is one allowlist entry rather than a new column. Empty means the
- # scout reads the project and writes only what the fleet grants every scout.
+ # User-facing write scopes this one scout holds, on top of the fleet-wide posture every scout
+ # carries. Plain scope strings (`["dashboard:write", "insight:write"]`), so adding a grantable
+ # object later is one allowlist entry rather than a new column. A new row starts with
+ # `SCOUT_DEFAULT_WRITE_SCOPES`. Empty means the scout reads the project and writes only its own
+ # findings and memory.
# Validated against `SCOUT_GRANTABLE_WRITE_SCOPES` at the API boundary and intersected against
# it again when a run's token is minted, so a stored grant cannot widen a token past the
# allowlist. Deliberately NOT excluded from activity logging, and gated in the config API to the
# scout's acting user and project admins: this field decides what an unattended agent may change
# in the project. A dry run (`emit=False`) ignores it, so a preview never mutates the project.
- write_scopes = models.JSONField(default=list, db_default=[])
+ write_scopes = models.JSONField(default=default_scout_write_scopes, db_default=[])
# Opt-in guard on the lifecycle fields (`enabled`, `emit`, deletion, and this flag). Off by
# default, so the fleet keeps the plain `signal_scout:write` bar. On, only the scout's
# resolved acting user or a project admin may pause, resume, switch to dry run, or delete it
diff --git a/products/signals/backend/scout_harness/AGENTS.md b/products/signals/backend/scout_harness/AGENTS.md
index 07bf5ed1bf68..6498b150fd7b 100644
--- a/products/signals/backend/scout_harness/AGENTS.md
+++ b/products/signals/backend/scout_harness/AGENTS.md
@@ -18,7 +18,7 @@ In production it is driven by `SignalsScoutCoordinatorWorkflow` (periodic tick e
- `runner.py`
Per-run entrypoint (`arun_signals_scout` / `run_signals_scout`). Inserts the `SignalScoutRun` row, builds the prompt + toolset, spawns the sandbox session, pumps the agent loop until budget exhaustion or natural completion, finalizes the run, and returns a `RunResult`. The activity wrapper in `temporal/agentic/scout_scheduler.py` delegates straight to this.
- The run's scope posture is composed here (`scout_scope_posture` in `posthog/temporal/oauth.py`): the fleet-wide scout preset plus the write scopes this one scout was granted on `SignalScoutConfig.write_scopes`, intersected against `SCOUT_GRANTABLE_WRITE_SCOPES` here and again at mint time, and withheld entirely on a dry run (`emit=False`) so a preview never mutates the project, and again when the acting user came from the team-level fallback (`resolve_acting_user_id_for_team`), since that member never approved the grant. The column value is handed to the posture builder unshaped, because coercing a stray JSON object with `list()` would turn its keys into a grant. The grant is stamped on the run row's `metadata["write_scopes"]` and on both lifecycle events, because the config can be widened or revoked afterwards and would otherwise rewrite what past runs could reach; the prompt's `# Write access` section is rendered from the same resolved value, so it can never name an object the token was refused. Who may set the grant is decided in `views.py` (`assert_can_grant_scout_write_scopes`): the scout's resolved acting user (`skill_loader.resolve_scout_acting_user_id`) or a project admin, never `LLMSkillOwner`, since any skill editor can rewrite that list; a scoped credential must also carry each scope it adds.
+ The run's scope posture is composed here (`scout_scope_posture` in `posthog/temporal/oauth.py`): the fleet-wide scout preset plus the write scopes this one scout was granted on `SignalScoutConfig.write_scopes`, intersected against `SCOUT_GRANTABLE_WRITE_SCOPES` here and again at mint time, and withheld entirely on a dry run (`emit=False`) so a preview never mutates the project, and narrowed to `SCOUT_DEFAULT_WRITE_SCOPES` when the acting user came from the team-level fallback (`resolve_acting_user_id_for_team`), since that member never approved the rest of the grant. A new config starts with those defaults (`notebook:write`), through the model default and the config API alike. The column value is handed to the posture builder unshaped, because coercing a stray JSON object with `list()` would turn its keys into a grant. The grant is stamped on the run row's `metadata["write_scopes"]` and on both lifecycle events, because the config can be widened or revoked afterwards and would otherwise rewrite what past runs could reach; the prompt's `# Write access` section is rendered from the same resolved value, so it can never name an object the token was refused. Who may set the grant is decided in `views.py` (`assert_can_grant_scout_write_scopes`): the scout's resolved acting user (`skill_loader.resolve_scout_acting_user_id`) or a project admin, never `LLMSkillOwner`, since any skill editor can rewrite that list; a scoped credential must also carry each scope it adds.
- `trial_launch.py` / `trial_state.py` / `trial_access.py` / `trial_views.py`
Private live comparisons. Read these when changing scout launch overrides, request-bound memory/report routing, or trial access. The server-bound sandbox task selects private state; caller-supplied run IDs never select another trial's context. `trial_result.py` checks runtime settings and exports finished state, while `trial_reads.py` overlays saved starting notes and recent runs. `trial_gateway.py` supplies short-lived gateway-only credentials for private report validation through the existing gateway.
`trial_inspection.py` supplies the comparison UI with source readiness, supported model/effort choices, and the operator's recent private runs.
diff --git a/products/signals/backend/scout_harness/prompt.py b/products/signals/backend/scout_harness/prompt.py
index c9200a166703..21a6e9c3d119 100644
--- a/products/signals/backend/scout_harness/prompt.py
+++ b/products/signals/backend/scout_harness/prompt.py
@@ -859,6 +859,7 @@ Your skill is a canonical PostHog-authored skill that runs on many projects, and
# only the objects this scout's token can actually write, so it can never steer a run at a tool the
# MCP server refuses it.
_WRITE_ACCESS_OBJECTS: dict[str, str] = {
+ "notebook:write": "notebooks",
"dashboard:write": "dashboards and their tiles",
"insight:write": "saved insights",
"annotation:write": "annotations",
@@ -877,8 +878,7 @@ def _write_access_section(write_scopes: Sequence[str]) -> str:
"""Compose the write-access section, or empty for a scout holding no grant.
A scout with no grant must not see this section at all: naming an object it cannot write
- would earn it a refused tool call, and the fleet posture is already described where it
- applies.
+ would earn it a refused tool call.
"""
granted = [_WRITE_ACCESS_OBJECTS[scope] for scope in write_scopes if scope in _WRITE_ACCESS_OBJECTS]
if not granted:
@@ -923,7 +923,7 @@ def _write_access_section(write_scopes: Sequence[str]) -> str:
)
return f"""# Write access
-Someone granted this scout write access to {listing} in this project, on top of what every scout can write. So where your skill body asks you to fix something of that kind, fix it rather than only describing the fix.
+This scout has write access to {listing} in this project. So where your skill body asks you to fix something of that kind, fix it rather than only describing the fix.
- **Only what your skill body asks for.** The grant is what you MAY change, not a list of chores. A run that changes nothing is the normal outcome when nothing your skill watches for is wrong.
- **The access is project-wide.** It reaches every object of that kind here, including ones people made by hand and ones another scout maintains. Change what your skill body points you at, and leave the rest alone.{annotation_reach}{skill_reach}{scanner_reach}{task_reach}{canvas_reach}
diff --git a/products/signals/backend/scout_harness/runner.py b/products/signals/backend/scout_harness/runner.py
index 4e4f8c45bdc3..e6dd48a0d958 100644
--- a/products/signals/backend/scout_harness/runner.py
+++ b/products/signals/backend/scout_harness/runner.py
@@ -27,7 +27,7 @@ from posthog.models.team.team import Team
from posthog.models.user import User
from posthog.models.utils import uuid7
from posthog.sync import database_sync_to_async
-from posthog.temporal.oauth import scout_mcp_scopes, scout_scope_posture
+from posthog.temporal.oauth import SCOUT_DEFAULT_WRITE_SCOPES, scout_mcp_scopes, scout_scope_posture
from products.business_knowledge.backend.logic import is_maintained_for_team
from products.data_catalog.backend.facade.api import approved_metric_names_for_team
@@ -414,16 +414,18 @@ async def _arun_signals_scout(
skill_version=skill.version,
skip_reason="no active user to act as for team",
)
- if acting_user.is_team_fallback and _granted_write_scopes(config):
+ granted_write_scopes = _granted_write_scopes(config)
+ if acting_user.is_team_fallback and set(granted_write_scopes) - SCOUT_DEFAULT_WRITE_SCOPES:
# The grant was approved for the person the runs act as. The team fallback is a member
- # who never approved it, so this run holds only the fleet posture. Cleared in memory
- # only: the runner never saves the config row, so the grant is back the moment the
- # author's identity resolves again.
+ # who never approved it, so this run holds only the fleet posture and the default scopes
+ # the scout still holds. The fleet granted those, not a person, so the fallback bypasses
+ # no approval by keeping them. Cleared in memory only: the runner never saves the config
+ # row, so the grant is back the moment the author's identity resolves again.
logger.info(
"signals_scout: withholding write access, acting user is the team fallback",
extra={"team_id": team_id, "skill_name": skill.name, "user_id": acting_user.user_id},
)
- config.write_scopes = []
+ config.write_scopes = sorted(set(granted_write_scopes) & SCOUT_DEFAULT_WRITE_SCOPES)
user_id = acting_user.user_id
started = time.monotonic()
@@ -957,9 +959,8 @@ async def _spawn_and_run(
repositories=tuple(repositories),
sandbox_environment_id=sandbox_env_id,
# `signals_scout` is the harness's own scope posture: project reads +
- # INTERNAL_SCOPES + the scout's `signal_scout_internal:write`, plus a narrow
- # allowlist of user-facing writes (`SCOUT_USER_WRITE_SCOPES`, e.g.
- # `notebook:write`) so a finding can produce a durable artifact. It reports
+ # INTERNAL_SCOPES + the scout's `signal_scout_internal:write`. User-facing writes,
+ # notebooks included, come only from the per-scout grant in `scope_posture`. It reports
# `has_write_scopes=True` so the MCP server doesn't enable read-only-mode tool
# filtering. Without that opt-out, the MCP layer would categorically strip every
# tool annotated `readOnlyHint: false` — including the agent's own `remember`,
diff --git a/products/signals/backend/scout_harness/serializers.py b/products/signals/backend/scout_harness/serializers.py
index 17c02ae0ffcf..2519b136bd48 100644
--- a/products/signals/backend/scout_harness/serializers.py
+++ b/products/signals/backend/scout_harness/serializers.py
@@ -32,7 +32,7 @@ from posthog.models.team.team import Team
from posthog.models.user import User
from posthog.permissions import get_authenticator_scopes
from posthog.slack.formatting import channel_id_from_target
-from posthog.temporal.oauth import SCOUT_GRANTABLE_WRITE_SCOPES
+from posthog.temporal.oauth import SCOUT_DEFAULT_WRITE_SCOPES, SCOUT_GRANTABLE_WRITE_SCOPES
from products.signals.backend.artefact_schemas import (
MAX_REPORT_LINK_REASON_LENGTH,
@@ -3307,14 +3307,16 @@ def validate_scout_repositories(value: list[str], context: dict, *, current: lis
GRANTABLE_WRITE_SCOPES: list[str] = sorted(SCOUT_GRANTABLE_WRITE_SCOPES)
_WRITE_SCOPES_HELP = (
- "Extra write access granted to this one scout, as scope strings. The grantable set is "
- f"{', '.join(f'`{scope}`' for scope in GRANTABLE_WRITE_SCOPES)}. Empty (the default) means the "
- "scout reads the project and writes only what every scout may write: notebooks, its findings, "
- "and its own memory. Each scope is project-wide and object-level, so a scout holding "
+ "Write access granted to this one scout, as scope strings. The grantable set is "
+ f"{', '.join(f'`{scope}`' for scope in GRANTABLE_WRITE_SCOPES)}. A new scout starts with "
+ f"{', '.join(f'`{scope}`' for scope in sorted(SCOUT_DEFAULT_WRITE_SCOPES))} when this field is "
+ "omitted. Empty means the scout reads the project and writes only its findings and its own "
+ "memory. Each scope is project-wide and object-level, so a scout holding "
"`dashboard:write` can update or delete any dashboard in the project, not only ones it made. "
"Grant only what this scout maintains. Only the person the scout's runs act as (whoever "
"authored it) or a project admin can set it, and a scoped API key must itself carry each scope "
- "it grants. A dry run (`emit=false`) never holds the grant. Applies from the scout's next run."
+ "it grants. A dry run (`emit=false`) never holds the grant, and a run that acts as a project "
+ "member other than the author holds only the default scopes. Applies from the scout's next run."
)
diff --git a/products/signals/backend/scout_harness/trial_launch.py b/products/signals/backend/scout_harness/trial_launch.py
index 06b5638f1872..bcd1425f4847 100644
--- a/products/signals/backend/scout_harness/trial_launch.py
+++ b/products/signals/backend/scout_harness/trial_launch.py
@@ -16,6 +16,7 @@ from pydantic import BaseModel, ConfigDict, Field, JsonValue
from posthog.llm.gateway_client import GatewayNotConfiguredError, ensure_scout_trial_capture_ready
from posthog.models import Team, User
from posthog.storage import object_storage
+from posthog.temporal.oauth import SCOUT_DEFAULT_WRITE_SCOPES, scout_scope_posture
from products.access_control.backend.facade.user_access_control import UserAccessControl
from products.signals.backend.agent_runtime import STEP_SCOUT, AgentRuntime, resolve_agent_runtime
@@ -250,7 +251,14 @@ def assert_trial_model_access(launch: TrialLaunch) -> None:
def assert_trial_capabilities_supported(config: SignalScoutConfig, skill: LoadedSkill) -> None:
if not skill_uses_report_channel(skill.allowed_tools):
raise ScoutTrialLaunchError("Live trials support scouts that create or edit reports.")
- if config.structured_output_schema or config.write_scopes or config.mcp_gateway_server_ids:
+ # Trials run without any grant, which costs a scout that holds only the default grant nothing it
+ # needs to be compared: its notebook is a write-up of a report, and the report is what is judged.
+ granted_writes = scout_scope_posture("signals_scout", config.write_scopes)["extra_write_scopes"]
+ if (
+ config.structured_output_schema
+ or set(granted_writes) - SCOUT_DEFAULT_WRITE_SCOPES
+ or config.mcp_gateway_server_ids
+ ):
raise ScoutTrialLaunchError("This scout requires writes or external tools that live trials do not support yet.")
diff --git a/products/signals/backend/scout_harness/views.py b/products/signals/backend/scout_harness/views.py
index 4ef72e999e7a..062e0306e4ca 100644
--- a/products/signals/backend/scout_harness/views.py
+++ b/products/signals/backend/scout_harness/views.py
@@ -65,7 +65,7 @@ from posthog.rate_limit import (
ClickHouseSustainedRateThrottle,
)
from posthog.temporal.common.client import sync_connect
-from posthog.temporal.oauth import SCOUT_GRANTABLE_WRITE_SCOPES
+from posthog.temporal.oauth import SCOUT_DEFAULT_WRITE_SCOPES, SCOUT_GRANTABLE_WRITE_SCOPES
from posthog.user_permissions import UserPermissions
from products.access_control.backend.facade.user_access_control import UserAccessControl
@@ -3094,7 +3094,8 @@ def _resolve_scout_config_grants(
config: SignalScoutConfig | None,
data: dict[str, Any],
) -> dict[str, Any]:
- current_scopes = set(_stored_write_scopes(config.write_scopes)) if config else set()
+ # A new config starts with the default grant, so a create that keeps or narrows it adds nothing.
+ current_scopes = set(_stored_write_scopes(config.write_scopes)) if config else set(SCOUT_DEFAULT_WRITE_SCOPES)
current_tools = config.allowed_mcp_tools if config else None
selects_tools = "allowed_mcp_tools" in data or "tool_preset" in data
resolved = dict(data)
@@ -3151,13 +3152,17 @@ def _resolve_scout_config_grants(
added_scopes=current_scopes,
)
elif "write_scopes" in data and set(data["write_scopes"]) != current_scopes:
- assert_can_grant_scout_write_scopes(
- request=request,
- team=team,
- skill_name=skill_name,
- config=config,
- added_scopes=set(data["write_scopes"]) - current_scopes,
- )
+ added_scopes = set(data["write_scopes"]) - current_scopes
+ # Narrowing an existing grant is still a change to what the author approved. Narrowing the
+ # default on a new config changes nobody's approval, so only an addition needs the gate.
+ if config is not None or added_scopes:
+ assert_can_grant_scout_write_scopes(
+ request=request,
+ team=team,
+ skill_name=skill_name,
+ config=config,
+ added_scopes=added_scopes,
+ )
return resolved
diff --git a/products/signals/backend/test/test_scout_harness.py b/products/signals/backend/test/test_scout_harness.py
index 3f79010990f4..009a78895c68 100644
--- a/products/signals/backend/test/test_scout_harness.py
+++ b/products/signals/backend/test/test_scout_harness.py
@@ -991,6 +991,11 @@ class TestWriteAccessPromptSection(SimpleTestCase):
assert "never create one" not in granted
assert "never create one" in _prompt(write_scopes=["canvas:write"])
+ # A scout that holds only the default grant still has to be told it may write notebooks.
+ notebooks_only = _prompt(write_scopes=["notebook:write"])
+ assert "# Write access" in notebooks_only
+ assert "write access to notebooks in this project" in notebooks_only
+
ungranted = _prompt(write_scopes=[])
assert "# Write access" not in ungranted
@@ -2162,16 +2167,23 @@ async def test_run_clones_the_scouts_pinned_repositories_when_a_token_can_be_min
pytest.param(
True,
True,
- ["dashboard:write"],
- {"preset": "signals_scout", "extra_write_scopes": ["dashboard:write"]},
+ ["dashboard:write", "notebook:write"],
+ {"preset": "signals_scout", "extra_write_scopes": ["dashboard:write", "notebook:write"]},
id="live_run_holds_the_grant",
),
# Dry run is how a person previews a scout before trusting it, so a dry run that could
# edit dashboards would do the thing they wanted to look at first.
pytest.param(False, True, [], "signals_scout", id="dry_run_holds_no_grant"),
# The grant was approved for the person the runs act as. When that identity no longer
- # resolves, the team fallback is a member who never approved it and cannot revoke it.
- pytest.param(True, False, [], "signals_scout", id="team_fallback_holds_no_grant"),
+ # resolves, the team fallback is a member who never approved it and cannot revoke it. The
+ # default notebook scope was granted by the fleet rather than a person, so it stays.
+ pytest.param(
+ True,
+ False,
+ ["notebook:write"],
+ {"preset": "signals_scout", "extra_write_scopes": ["notebook:write"]},
+ id="team_fallback_holds_only_the_default_grant",
+ ),
],
)
async def test_run_mints_the_scouts_granted_write_scopes_and_stamps_them_on_the_run(
@@ -2188,7 +2200,7 @@ async def test_run_mints_the_scouts_granted_write_scopes_and_stamps_them_on_the_
team_id=ateam.id,
skill_name="signals-scout-errors",
emit=emit,
- write_scopes=["dashboard:write", "feature_flag:write"],
+ write_scopes=["dashboard:write", "feature_flag:write", "notebook:write"],
)
await database_sync_to_async(_seed_config, thread_sensitive=False)()
diff --git a/products/signals/backend/test/test_scout_harness_api.py b/products/signals/backend/test/test_scout_harness_api.py
index b41b38eeeca0..6a25eb3e0099 100644
--- a/products/signals/backend/test/test_scout_harness_api.py
+++ b/products/signals/backend/test/test_scout_harness_api.py
@@ -1452,7 +1452,7 @@ class TestScoutHarnessConfigWriteScopesAPI(APIBaseTest):
assert response.status_code == status.HTTP_400_BAD_REQUEST
assert "dashboard:write" in str(response.json())
config.refresh_from_db()
- assert config.write_scopes == []
+ assert config.write_scopes == ["notebook:write"]
@parameterized.expand(
[
@@ -1485,7 +1485,7 @@ class TestScoutHarnessConfigWriteScopesAPI(APIBaseTest):
assert response.status_code == expected, response.json()
config.refresh_from_db()
- assert config.write_scopes == (["dashboard:write"] if expected == status.HTTP_200_OK else [])
+ assert config.write_scopes == (["dashboard:write"] if expected == status.HTTP_200_OK else ["notebook:write"])
def test_a_non_author_may_still_edit_other_fields_and_resend_the_grant(self) -> None:
# Clients resend whole config objects, so an unchanged `write_scopes` must not turn an
@@ -1530,6 +1530,29 @@ class TestScoutHarnessConfigWriteScopesAPI(APIBaseTest):
config.refresh_from_db()
assert config.write_scopes == {"dashboard:write": False}
+ @parameterized.expand(
+ [
+ # The config API, not only the model, has to give a new scout the default grant.
+ ("omitted_takes_the_default", None, status.HTTP_201_CREATED, ["notebook:write"]),
+ # Turning the default off at creation narrows nobody's approval, so any member may.
+ ("narrowing_the_default_needs_no_claim", [], status.HTTP_201_CREATED, []),
+ ("adding_to_the_default_needs_the_claim", ["dashboard:write"], status.HTTP_403_FORBIDDEN, None),
+ ]
+ )
+ def test_a_new_config_starts_with_the_default_grant(
+ self, _name: str, requested: list[str] | None, expected: int, stored: list[str] | None
+ ) -> None:
+ self._authored_by(self._other_member())
+ data: dict = {"skill_name": "signals-scout-hygiene"}
+ if requested is not None:
+ data["write_scopes"] = requested
+
+ response = self.client.post(f"/api/projects/{self.team.id}/signals/scout/configs/", data=data, format="json")
+
+ assert response.status_code == expected, response.json()
+ config = SignalScoutConfig.objects.filter(team=self.team, skill_name="signals-scout-hygiene").first()
+ assert (config.write_scopes if config else None) == stored
+
def test_creating_a_scout_with_a_grant_records_it_in_the_activity_log(self) -> None:
# A creation diffs against nothing, so without this the log's first entry for a granted
# scout says nothing about its access and a later revoke has no "before" to point at.
diff --git a/products/signals/frontend/generated/api.schemas.ts b/products/signals/frontend/generated/api.schemas.ts
index a6dcd3f00317..705735b8b85f 100644
--- a/products/signals/frontend/generated/api.schemas.ts
+++ b/products/signals/frontend/generated/api.schemas.ts
@@ -3454,8 +3454,8 @@ export interface SignalScoutConfigOptionsApi {
*/
repositories?: string[]
/**
- * Extra write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. Empty (the default) means the scout reads the project and writes only what every scout may write: notebooks, its findings, and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant. Applies from the scout's next run.
- * @maxItems 11
+ * Write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `notebook:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. A new scout starts with `notebook:write` when this field is omitted. Empty means the scout reads the project and writes only its findings and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant, and a run that acts as a project member other than the author holds only the default scopes. Applies from the scout's next run.
+ * @maxItems 12
*/
write_scopes?: string[]
/** Opt-in guard on this scout's lifecycle. Off by default, so anyone with scout write access may pause, resume, switch the scout to dry run, or delete it. On, only the person the scout's runs act as or a project admin may do any of those, or change this flag. Use it on a scout whose output people depend on: `signal_scout:write` is a project-wide scope held by people and by unattended agents alike, and a resume has to pass the project's enabled-scout maximum that a pause does not, so a bulk pause is not undone in one step. The lock never stops an automatic pause, such as the inactivity sweep or the repeated-failure breaker. */
@@ -3801,8 +3801,8 @@ export interface SignalScoutConfigApi {
*/
repositories?: string[]
/**
- * Extra write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. Empty (the default) means the scout reads the project and writes only what every scout may write: notebooks, its findings, and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant. Applies from the scout's next run.
- * @maxItems 11
+ * Write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `notebook:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. A new scout starts with `notebook:write` when this field is omitted. Empty means the scout reads the project and writes only its findings and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant, and a run that acts as a project member other than the author holds only the default scopes. Applies from the scout's next run.
+ * @maxItems 12
*/
readonly write_scopes: readonly string[]
/** Opt-in guard on this scout's lifecycle. Off by default, so anyone with scout write access may pause, resume, switch the scout to dry run, or delete it. On, only the person the scout's runs act as or a project admin may do any of those, or change this flag. Use it on a scout whose output people depend on: `signal_scout:write` is a project-wide scope held by people and by unattended agents alike, and a resume has to pass the project's enabled-scout maximum that a pause does not, so a bulk pause is not undone in one step. The lock never stops an automatic pause, such as the inactivity sweep or the repeated-failure breaker. */
@@ -3949,8 +3949,8 @@ export interface SignalScoutConfigCreateApi {
*/
repositories?: string[]
/**
- * Extra write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. Empty (the default) means the scout reads the project and writes only what every scout may write: notebooks, its findings, and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant. Applies from the scout's next run.
- * @maxItems 11
+ * Write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `notebook:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. A new scout starts with `notebook:write` when this field is omitted. Empty means the scout reads the project and writes only its findings and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant, and a run that acts as a project member other than the author holds only the default scopes. Applies from the scout's next run.
+ * @maxItems 12
*/
write_scopes?: string[]
/** Opt-in guard on this scout's lifecycle. Off by default, so anyone with scout write access may pause, resume, switch the scout to dry run, or delete it. On, only the person the scout's runs act as or a project admin may do any of those, or change this flag. Use it on a scout whose output people depend on: `signal_scout:write` is a project-wide scope held by people and by unattended agents alike, and a resume has to pass the project's enabled-scout maximum that a pause does not, so a bulk pause is not undone in one step. The lock never stops an automatic pause, such as the inactivity sweep or the repeated-failure breaker. */
@@ -4108,8 +4108,8 @@ export interface PatchedSignalScoutConfigUpdateApi {
*/
repositories?: string[]
/**
- * Extra write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. Empty (the default) means the scout reads the project and writes only what every scout may write: notebooks, its findings, and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant. Applies from the scout's next run.
- * @maxItems 11
+ * Write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `notebook:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. A new scout starts with `notebook:write` when this field is omitted. Empty means the scout reads the project and writes only its findings and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant, and a run that acts as a project member other than the author holds only the default scopes. Applies from the scout's next run.
+ * @maxItems 12
*/
write_scopes?: string[]
/**
diff --git a/products/signals/frontend/generated/api.zod.ts b/products/signals/frontend/generated/api.zod.ts
index 748bc13240c2..359e05aadbe3 100644
--- a/products/signals/frontend/generated/api.zod.ts
+++ b/products/signals/frontend/generated/api.zod.ts
@@ -753,7 +753,7 @@ export const signalsScoutCreateBodyConfigOneRepositoriesItemMax = 255
export const signalsScoutCreateBodyConfigOneRepositoriesMax = 10
-export const signalsScoutCreateBodyConfigOneWriteScopesMax = 11
+export const signalsScoutCreateBodyConfigOneWriteScopesMax = 12
export const signalsScoutCreateBodyConfigOnePrecheckQueryMax = 10000
@@ -859,7 +859,7 @@ export const SignalsScoutCreateBody = /* @__PURE__ */ zod
.max(signalsScoutCreateBodyConfigOneWriteScopesMax)
.optional()
.describe(
- "Extra write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. Empty (the default) means the scout reads the project and writes only what every scout may write: notebooks, its findings, and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant. Applies from the scout's next run."
+ "Write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `notebook:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. A new scout starts with `notebook:write` when this field is omitted. Empty means the scout reads the project and writes only its findings and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant, and a run that acts as a project member other than the author holds only the default scopes. Applies from the scout's next run."
),
lifecycle_locked: zod
.boolean()
@@ -1054,7 +1054,7 @@ export const signalsScoutConfigCreateBodyRepositoriesItemMax = 255
export const signalsScoutConfigCreateBodyRepositoriesMax = 10
-export const signalsScoutConfigCreateBodyWriteScopesMax = 11
+export const signalsScoutConfigCreateBodyWriteScopesMax = 12
export const signalsScoutConfigCreateBodyPrecheckQueryMax = 10000
@@ -1118,7 +1118,7 @@ export const SignalsScoutConfigCreateBody = /* @__PURE__ */ zod
.max(signalsScoutConfigCreateBodyWriteScopesMax)
.optional()
.describe(
- "Extra write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. Empty (the default) means the scout reads the project and writes only what every scout may write: notebooks, its findings, and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant. Applies from the scout's next run."
+ "Write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `notebook:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. A new scout starts with `notebook:write` when this field is omitted. Empty means the scout reads the project and writes only its findings and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant, and a run that acts as a project member other than the author holds only the default scopes. Applies from the scout's next run."
),
lifecycle_locked: zod
.boolean()
@@ -1289,7 +1289,7 @@ export const signalsScoutConfigUpdateBodyRepositoriesItemMax = 255
export const signalsScoutConfigUpdateBodyRepositoriesMax = 10
-export const signalsScoutConfigUpdateBodyWriteScopesMax = 11
+export const signalsScoutConfigUpdateBodyWriteScopesMax = 12
export const signalsScoutConfigUpdateBodyPrecheckQueryMax = 10000
@@ -1445,7 +1445,7 @@ export const SignalsScoutConfigUpdateBody = /* @__PURE__ */ zod
.max(signalsScoutConfigUpdateBodyWriteScopesMax)
.optional()
.describe(
- "Extra write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. Empty (the default) means the scout reads the project and writes only what every scout may write: notebooks, its findings, and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant. Applies from the scout's next run."
+ "Write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `notebook:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. A new scout starts with `notebook:write` when this field is omitted. Empty means the scout reads the project and writes only its findings and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant, and a run that acts as a project member other than the author holds only the default scopes. Applies from the scout's next run."
),
precheck_query: zod
.string()
diff --git a/products/signals/frontend/inbox/components/config/scouts/ScoutWriteAccessTag.tsx b/products/signals/frontend/inbox/components/config/scouts/ScoutWriteAccessTag.tsx
index 145794136804..320bbdb14bbe 100644
--- a/products/signals/frontend/inbox/components/config/scouts/ScoutWriteAccessTag.tsx
+++ b/products/signals/frontend/inbox/components/config/scouts/ScoutWriteAccessTag.tsx
@@ -1,11 +1,12 @@
import { IconPencil } from '@posthog/icons'
import { LemonTag, Tooltip } from '@posthog/lemon-ui'
-import { scoutWriteScopeLabels } from './scoutWriteScopes'
+import { scoutWriteScopeLabels, scoutWriteScopesBeyondDefault } from './scoutWriteScopes'
/**
- * Names what a scout may write in the project, or nothing for a read-only scout. Every other scout
- * reads the project, so a chip on those would label the norm and hide the exception in the noise.
+ * Names what a scout may write in the project beyond the default grant, or nothing for a scout that
+ * holds only the default. Most scouts hold just that, so a chip on those would label the norm and
+ * hide the exception in the noise.
*
* A dry run holds no grant, so the chip goes muted rather than away: the grant is still set and
* comes back the moment the scout leaves dry run, and hiding it would make that a surprise.
@@ -21,7 +22,7 @@ export function ScoutWriteAccessTag({
/** Icon only, for a row too narrow to carry the labels. The tooltip still names them. */
compact?: boolean
}): JSX.Element | null {
- const labels = scoutWriteScopeLabels(writeScopes)
+ const labels = scoutWriteScopeLabels(scoutWriteScopesBeyondDefault(writeScopes))
if (labels.length === 0) {
return null
}
diff --git a/products/signals/frontend/inbox/components/config/scouts/ScoutWriteScopesPicker.tsx b/products/signals/frontend/inbox/components/config/scouts/ScoutWriteScopesPicker.tsx
index f71f99b84d3a..e9feed1b2f3f 100644
--- a/products/signals/frontend/inbox/components/config/scouts/ScoutWriteScopesPicker.tsx
+++ b/products/signals/frontend/inbox/components/config/scouts/ScoutWriteScopesPicker.tsx
@@ -9,6 +9,7 @@ import {
filterVisibleScoutWriteScopeRows,
offeredScoutWriteScopes,
SCOUT_ALWAYS_GRANTED_ROWS,
+ scoutWriteScopesBeyondDefault,
} from './scoutWriteScopes'
interface ScoutWriteScopesPickerProps {
@@ -83,7 +84,7 @@ export function ScoutWriteScopesPicker({
</div>
))}
</div>
- {selectedScopes.length > 0 && (
+ {scoutWriteScopesBeyondDefault(selectedScopes).length > 0 && (
<p className="text-[11.5px] text-warning mb-0">
Write access covers the whole project. A scout that can write dashboards can change or delete any
dashboard here, not only ones it created. Annotations also include organization-wide ones that other
diff --git a/products/signals/frontend/inbox/components/config/scouts/scoutWriteScopes.test.ts b/products/signals/frontend/inbox/components/config/scouts/scoutWriteScopes.test.ts
index c91cfed0d636..41bc7dbdc5a4 100644
--- a/products/signals/frontend/inbox/components/config/scouts/scoutWriteScopes.test.ts
+++ b/products/signals/frontend/inbox/components/config/scouts/scoutWriteScopes.test.ts
@@ -1,6 +1,11 @@
import { FEATURE_FLAGS } from 'lib/constants'
-import { filterVisibleScoutWriteScopeRows, offeredScoutWriteScopes, scoutWriteScopeLabels } from './scoutWriteScopes'
+import {
+ filterVisibleScoutWriteScopeRows,
+ offeredScoutWriteScopes,
+ scoutWriteScopeLabels,
+ scoutWriteScopesBeyondDefault,
+} from './scoutWriteScopes'
describe('scoutWriteScopes', () => {
it('labels only the scopes the picker offers', () => {
@@ -9,13 +14,20 @@ describe('scoutWriteScopes', () => {
expect(
scoutWriteScopeLabels([
'insight:write',
+ 'notebook:write',
'llm_skill:write',
'dashboard:write',
'replay_scanner:write',
'customer_task:write',
'cohort:write',
])
- ).toEqual(['Dashboards', 'Insights', 'Customer tasks', 'Skills', 'Replay vision scanners'])
+ ).toEqual(['Notebooks', 'Dashboards', 'Insights', 'Customer tasks', 'Skills', 'Replay vision scanners'])
+ })
+
+ it('leaves the default grant out of what sets a scout apart', () => {
+ // Nearly every scout holds notebooks, so a roster chip for it would mark every row.
+ expect(scoutWriteScopesBeyondDefault(['notebook:write'])).toEqual([])
+ expect(scoutWriteScopesBeyondDefault(['notebook:write', 'dashboard:write'])).toEqual(['dashboard:write'])
})
it('drops a stored scope the picker has no row for', () => {
diff --git a/products/signals/frontend/inbox/components/config/scouts/scoutWriteScopes.ts b/products/signals/frontend/inbox/components/config/scouts/scoutWriteScopes.ts
index 236031a17d43..800c1b531243 100644
--- a/products/signals/frontend/inbox/components/config/scouts/scoutWriteScopes.ts
+++ b/products/signals/frontend/inbox/components/config/scouts/scoutWriteScopes.ts
@@ -7,6 +7,7 @@ export interface ScoutWriteScopeRow {
/** Heading the row sits under. Purely a label: the API stores a flat list of scopes. */
group:
| 'Analytics'
+ | 'Notebooks'
| 'Monitoring'
| 'Customer analytics'
| 'Scouts and skills'
@@ -34,6 +35,12 @@ export interface ScoutWriteScopeRow {
* picker does not show an unreleased product.
*/
export const SCOUT_WRITE_SCOPE_ROWS: ScoutWriteScopeRow[] = [
+ {
+ scope: 'notebook:write',
+ group: 'Notebooks',
+ label: 'Notebooks',
+ description: 'Create, edit, run, and delete notebooks, including ones people made',
+ },
{
scope: 'dashboard:write',
group: 'Analytics',
@@ -111,10 +118,21 @@ export const SCOUT_WRITE_SCOPE_ROWS: ScoutWriteScopeRow[] = [
/** What every scout can write, whatever its grant. Shown so the picker is the whole picture. */
export const SCOUT_ALWAYS_GRANTED_ROWS: { label: string; description: string }[] = [
- { label: 'Notebooks', description: 'Every scout can write notebooks' },
{ label: 'Inbox and memory', description: 'Its reports, findings, and shared scout memory' },
]
+/**
+ * The grant a new scout starts with, mirroring `SCOUT_DEFAULT_WRITE_SCOPES` in
+ * `posthog/temporal/oauth.py`. Every scout holds these unless a person turned them off, so they are
+ * the norm rather than something to call out.
+ */
+export const SCOUT_DEFAULT_WRITE_SCOPES: readonly string[] = ['notebook:write']
+
+/** The scopes a scout holds beyond the default grant. */
+export function scoutWriteScopesBeyondDefault(scopes: readonly string[] | undefined): string[] {
+ return (scopes ?? []).filter((scope) => !SCOUT_DEFAULT_WRITE_SCOPES.includes(scope))
+}
+
/**
* The rows the picker shows. A hidden row still counts in `offeredScoutWriteScopes`, so a save by
* someone without the flag keeps a grant a flagged teammate made.
diff --git a/products/signals/frontend/inbox/logics/scoutCreateModalLogic.test.ts b/products/signals/frontend/inbox/logics/scoutCreateModalLogic.test.ts
index df6bb07c7183..64b78702cfeb 100644
--- a/products/signals/frontend/inbox/logics/scoutCreateModalLogic.test.ts
+++ b/products/signals/frontend/inbox/logics/scoutCreateModalLogic.test.ts
@@ -170,7 +170,7 @@ describe('scoutCreateModalLogic', () => {
run_cron_schedule: null,
mcp_gateway_server_ids: [],
repositories: [],
- write_scopes: [],
+ write_scopes: ['notebook:write'],
output_destinations: {
slack: {
integration_id: 42,
@@ -195,7 +195,7 @@ describe('scoutCreateModalLogic', () => {
run_cron_schedule: null,
mcp_gateway_server_ids: [],
repositories: [],
- write_scopes: [],
+ write_scopes: ['notebook:write'],
output_destinations: {
slack: {
integration_id: 42,
@@ -240,7 +240,7 @@ describe('scoutCreateModalLogic', () => {
mcp_gateway_server_ids: [],
repositories: [],
tags: [],
- write_scopes: [],
+ write_scopes: ['notebook:write'],
})
expect(onEnabled).toHaveBeenCalledTimes(1)
expect(onCreated).not.toHaveBeenCalled()
@@ -340,7 +340,7 @@ describe('scoutCreateModalLogic', () => {
tags: [],
mcp_gateway_server_ids: [],
repositories: [],
- write_scopes: [],
+ write_scopes: ['notebook:write'],
},
}),
})
@@ -357,7 +357,7 @@ describe('scoutCreateModalLogic', () => {
tags: [],
mcp_gateway_server_ids: [],
repositories: [],
- write_scopes: [],
+ write_scopes: ['notebook:write'],
},
})
)
diff --git a/products/signals/frontend/inbox/logics/scoutCreateModalLogic.ts b/products/signals/frontend/inbox/logics/scoutCreateModalLogic.ts
index bec5d361e18a..1af41721b5de 100644
--- a/products/signals/frontend/inbox/logics/scoutCreateModalLogic.ts
+++ b/products/signals/frontend/inbox/logics/scoutCreateModalLogic.ts
@@ -32,6 +32,7 @@ import type {
} from 'products/signals/frontend/generated/api.schemas'
import { SKILL_DESCRIPTION_MAX_LENGTH, validateSkillName } from 'products/skills/frontend/skillConstants'
+import { SCOUT_DEFAULT_WRITE_SCOPES } from '../components/config/scouts/scoutWriteScopes'
import {
dailyCronToTime,
dayTimeToWeeklyCron,
@@ -121,7 +122,7 @@ export const DEFAULT_SCOUT_CREATE_FORM_VALUES: ScoutCreateFormValues = {
tags: [],
mcp_gateway_server_ids: [],
repositories: [],
- write_scopes: [],
+ write_scopes: [...SCOUT_DEFAULT_WRITE_SCOPES],
},
}
diff --git a/products/signals/skills/authoring-scouts/SKILL.md b/products/signals/skills/authoring-scouts/SKILL.md
index c54d03c4a3e6..293a83ec24be 100644
--- a/products/signals/skills/authoring-scouts/SKILL.md
+++ b/products/signals/skills/authoring-scouts/SKILL.md
@@ -163,7 +163,8 @@ For an **existing scout**, tune with `posthog:scout-config-update` (find the `id
A scout whose reports nobody engages with (no open, rating, or action — the cloud web inbox records reads; other clients don't yet) is warned and then paused automatically (`pause_reason=ignored`) — every run costs a sandbox agent, so a scout producing output no human consumes shouldn't keep running forever. A scout that is merely quiet is only flagged (`pause_reason=no_output`, a warning that never advances to a pause), since a watch scout's silence can be its job.
`-config-list` shows the warning as `status=pending_pause` and the pause as `status=paused_by_system`; setting `enabled=true` again resumes the scout with a fresh grace window before the sweep may judge it again.
Set `auto_pause_exempt=true` up front for a watchdog scout whose whole job is to stay quiet, so it never even picks up the quiet flag.
-- `write_scopes` — defaults to `[]`: the scout reads the project and writes only what every scout writes (its findings, its memory, and notebooks).
+- `write_scopes` — defaults to `["notebook:write"]`: the scout reads the project and writes its findings, its memory, and notebooks.
+ `notebook:write` reaches every notebook in the project, not only the ones the scout made. Send `[]` (or drop it from the list) for a scout that should write nothing but its findings and memory. Unlike the other scopes, a run keeps it when its author no longer resolves and it acts as another project member.
Grant `dashboard:write`, `insight:write`, `annotation:write`, `alert:write`, `customer_task:write`, `llm_skill:write`, `warehouse_view:write`, `warehouse_table:write`, `replay_scanner:write`, or `canvas:write` to a scout whose job is to **maintain** one of those things rather than only describe what it would change.
The body of such a scout follows the maintainer / steward pattern in `references/scout-patterns.md`: a curated inventory, a write ladder (do-and-log, do-verify-report, hand-to-a-human), a per-run change cap, and a rolling maintenance report naming every object changed.
Each scope is project-wide and covers update and delete of every object of its kind, not only the ones the scout made, so grant only what the scout's body actually tends, and say in the body what it may change and when.
diff --git a/products/signals/skills/exploring-scouts/references/scout-data-model.md b/products/signals/skills/exploring-scouts/references/scout-data-model.md
index 0d269545bb5e..9b8f04334960 100644
--- a/products/signals/skills/exploring-scouts/references/scout-data-model.md
+++ b/products/signals/skills/exploring-scouts/references/scout-data-model.md
@@ -28,7 +28,7 @@ This is the scout's control surface, separate from its instruction body (the `LL
| `output_destinations` | Where reports go besides the inbox: `slack` (integration plus a channel or up to five DM targets, optional `thread_reports`) is the only destination Signals delivers to itself; a `webhook` entry is a pointer to a CDP destination the owning product manages, and says nothing about whether anything is delivered there. |
| `network_access` | What the run's sandbox can reach: `trusted` (default: the platform's trusted-domain allowlist: PostHog, GitHub, package registries) or `full` (any site, for skills that read external docs/papers). |
| `mcp_gateway_server_ids` | MCP store servers the scout's runs may mount, from connections shared with the whole team. Empty = no shared servers (where gateway enforcement is not yet active, the acting user's personal connections may still mount). Security-relevant like `network_access`, and activity-logged. |
-| `write_scopes` | Extra project-wide write scopes a person granted this scout (`dashboard:write`, `insight:write`, `annotation:write`, `alert:write`, `customer_task:write`, `llm_skill:write`, `warehouse_view:write`, `warehouse_table:write`, `replay_scanner:write`, `canvas:write`). Empty = read-only beyond findings, memory, and notebooks. A dry run never holds them. |
+| `write_scopes` | Project-wide write scopes this scout holds (`notebook:write`, `dashboard:write`, `insight:write`, `annotation:write`, `alert:write`, `customer_task:write`, `llm_skill:write`, `warehouse_view:write`, `warehouse_table:write`, `replay_scanner:write`, `canvas:write`). New scouts start with `notebook:write`. Empty = read-only beyond findings and memory. A dry run never holds them. |
| `model` | Pinned model for this scout's runs, or null to follow the fleet default. Setting one needs the `scouts-model-config` early-access flag on the project. |
| `structured_output_schema` | Optional JSON Schema (object-rooted) describing one structured record the scout produces via `scout-record-output`. Null = the structured-output channel is off (it also needs `emit` on). When set, each run is shown the schema and its records are validated against it and recorded as `$scout_structured_output` events. |
| `tags` | Free-form kebab-case labels (up to 10) grouping the fleet; `scout-config-list` filters on them. |
diff --git a/products/signals/skills/signals-scout-anomaly-detection/SKILL.md b/products/signals/skills/signals-scout-anomaly-detection/SKILL.md
index 60e1805a21f7..f653a1d6c66c 100644
--- a/products/signals/skills/signals-scout-anomaly-detection/SKILL.md
+++ b/products/signals/skills/signals-scout-anomaly-detection/SKILL.md
@@ -129,6 +129,7 @@ Write (user-facing):
- `scout-emit-report` / `scout-edit-report` (gated on `signal_scout_report:write`) — the report channel: author a full inbox report for an anomaly, or update the existing one on a recurrence. Field-level contract in [`references/report-contract.md`](references/report-contract.md).
- `notebooks-create` (gated on `notebook:write`) — the durable write-up that backs an authored report. Build it _before_ authoring and reference its URL from the report `summary` and an `evidence` entry. Layout + embedded-chart recipe (embed the anomalous insight with a `SavedInsightNode`; chart a SQL-fallback series with a `DataVisualizationNode`) is in [`references/report-contract.md`](references/report-contract.md).
- `notebooks-destroy` — clean up the write-up if the report did not surface (preflight gate-skip, or the safety judge suppressed it) so a non-surfacing run leaves no orphan artifact. See [`references/report-contract.md`](references/report-contract.md).
+- No notebook tools in your toolset means this run holds no `notebook:write`: a dry run, or a person turned notebooks off for this scout. Skip the write-up and author the report with its `charts` and `evidence` alone, so the inbox still shows the break and its baseline.
Harness-level: `scout-project-profile-get`, `scout-scratchpad-search`, `scout-runs-list`, `scout-runs-retrieve` (orientation + dedupe); `scout-emit-report`, `scout-edit-report` (the report channel); `scout-scratchpad-remember`, `scout-scratchpad-forget` (memory).
diff --git a/products/signals/skills/working-with-scouts/SKILL.md b/products/signals/skills/working-with-scouts/SKILL.md
index 42fb7566419e..ff48ea61eb5c 100644
--- a/products/signals/skills/working-with-scouts/SKILL.md
+++ b/products/signals/skills/working-with-scouts/SKILL.md
@@ -127,6 +127,7 @@ Which `scopes` value each granted scope writes under:
| Granted write scope | Activity `scopes` value |
| ----------------------- | --------------------------------------------- |
+| `notebook:write` | `Notebook` |
| `dashboard:write` | `Dashboard` |
| `insight:write` | `Insight` |
| `annotation:write` | `Annotation` |
@@ -136,7 +137,6 @@ Which `scopes` value each granted scope writes under:
| `llm_skill:write` | `PersonalAPIKey` |
| `canvas:write` | `Canvas` |
-Pass `Notebook` as well, whatever the grant says: notebooks are the floor write every scout holds, so any scout can leave rows under that scope.
Some grants also reach objects they are not named for: both warehouse grants reach the data quality checks on their subject, and `llm_skill:write` reaches the skill-store install command, which mints or rotates the acting user's marketplace credential.
The scope-named objects themselves still log nothing: a skill body edit (including another scout's) and a warehouse table write leave no row, so read the skill's version history instead.
A canvas publish leaves no activity row either. Read the canvas's version history: each version a scout published records the run's task.
@@ -145,9 +145,8 @@ Four caveats change what the answer means:
- **The window is not an attribution.** Without a scout tag, the window can include the acting user's other writes. Even with a tag, overlapping runs of the same scout can share it. Compare actors, items, and timestamps with the close-out.
- **History access is optional.** Permissions, the Cloud Audit Logs entitlement, and the plan's retention window can make history unavailable. Missing history does not establish that a run made no changes. Defer conclusions that depend on it and continue independent checks; a confirmed access restriction is not a missing-tool defect.
-- **A dry run drops the grant, not the floor.** A scout on `emit: false` never holds the granted scopes, so it writes no rows under the scopes in the table above.
- It keeps `notebook:write`, the floor write every scout holds, so a dry run can still create, edit, or delete a notebook.
- Keep `Notebook` in the filter for a dry-run window.
+- **A dry run holds no grant.** A scout on `emit: false` never holds the granted scopes, notebooks included, so it writes no rows under the scopes in the table above.
+- **A team-fallback run keeps only the default grant.** When the scout's author no longer resolves, the run acts as another project member and holds only `notebook:write` (if the scout still has it), so it can leave `Notebook` rows and nothing else.
- **A refused write is not logged, because it never happened.** The grant is an upper bound and the acting user's own permissions still apply, so a close-out that reports a refused write will have no matching row. That is the expected pairing, not a discrepancy.
## The steering ladder
diff --git a/products/workflows/backend/tests/api/test_workflow_proposals.py b/products/workflows/backend/tests/api/test_workflow_proposals.py
index a6dddc608f30..033776c9be13 100644
--- a/products/workflows/backend/tests/api/test_workflow_proposals.py
+++ b/products/workflows/backend/tests/api/test_workflow_proposals.py
@@ -615,7 +615,7 @@ class TestWorkflowProposals(APIBaseTest):
assert scout is not None
assert (scout.enabled, scout.write_scopes, scout.enabled_by_id) == (
True,
- ["hog_flow_proposal:write"],
+ ["hog_flow_proposal:write", "notebook:write"],
self.user.id,
)
@@ -699,7 +699,7 @@ class TestWorkflowProposals(APIBaseTest):
response = self._toggle(flow_id, enabled, headers, team_id=flow_team_id)
scout = self._suggestions_scout()
- assert scout is None or scout.write_scopes == []
+ assert scout is None or "hog_flow_proposal:write" not in scout.write_scopes
assert response["scout_status"] == scout_status
if case == "system_paused":
assert scout is not None and scout.status == SignalScoutConfig.Status.PAUSED_BY_SYSTEM
diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.ts
index 9e928e63e3f9..6f7c2daeb5a4 100644
--- a/services/mcp/src/api/generated.ts
+++ b/services/mcp/src/api/generated.ts
@@ -84839,8 +84839,8 @@ export namespace Schemas {
*/
repositories?: string[];
/**
- * Extra write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. Empty (the default) means the scout reads the project and writes only what every scout may write: notebooks, its findings, and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant. Applies from the scout's next run.
- * @maxItems 11
+ * Write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `notebook:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. A new scout starts with `notebook:write` when this field is omitted. Empty means the scout reads the project and writes only its findings and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant, and a run that acts as a project member other than the author holds only the default scopes. Applies from the scout's next run.
+ * @maxItems 12
*/
write_scopes?: string[];
/**
@@ -98531,8 +98531,8 @@ export namespace Schemas {
*/
repositories?: string[];
/**
- * Extra write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. Empty (the default) means the scout reads the project and writes only what every scout may write: notebooks, its findings, and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant. Applies from the scout's next run.
- * @maxItems 11
+ * Write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `notebook:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. A new scout starts with `notebook:write` when this field is omitted. Empty means the scout reads the project and writes only its findings and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant, and a run that acts as a project member other than the author holds only the default scopes. Applies from the scout's next run.
+ * @maxItems 12
*/
write_scopes?: string[];
/** Opt-in guard on this scout's lifecycle. Off by default, so anyone with scout write access may pause, resume, switch the scout to dry run, or delete it. On, only the person the scout's runs act as or a project admin may do any of those, or change this flag. Use it on a scout whose output people depend on: `signal_scout:write` is a project-wide scope held by people and by unattended agents alike, and a resume has to pass the project's enabled-scout maximum that a pause does not, so a bulk pause is not undone in one step. The lock never stops an automatic pause, such as the inactivity sweep or the repeated-failure breaker. */
@@ -98813,8 +98813,8 @@ export namespace Schemas {
*/
repositories?: string[];
/**
- * Extra write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. Empty (the default) means the scout reads the project and writes only what every scout may write: notebooks, its findings, and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant. Applies from the scout's next run.
- * @maxItems 11
+ * Write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `notebook:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. A new scout starts with `notebook:write` when this field is omitted. Empty means the scout reads the project and writes only its findings and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant, and a run that acts as a project member other than the author holds only the default scopes. Applies from the scout's next run.
+ * @maxItems 12
*/
readonly write_scopes: readonly string[];
/** Opt-in guard on this scout's lifecycle. Off by default, so anyone with scout write access may pause, resume, switch the scout to dry run, or delete it. On, only the person the scout's runs act as or a project admin may do any of those, or change this flag. Use it on a scout whose output people depend on: `signal_scout:write` is a project-wide scope held by people and by unattended agents alike, and a resume has to pass the project's enabled-scout maximum that a pause does not, so a bulk pause is not undone in one step. The lock never stops an automatic pause, such as the inactivity sweep or the repeated-failure breaker. */
@@ -101726,8 +101726,8 @@ export namespace Schemas {
*/
repositories?: string[];
/**
- * Extra write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. Empty (the default) means the scout reads the project and writes only what every scout may write: notebooks, its findings, and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant. Applies from the scout's next run.
- * @maxItems 11
+ * Write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `notebook:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. A new scout starts with `notebook:write` when this field is omitted. Empty means the scout reads the project and writes only its findings and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant, and a run that acts as a project member other than the author holds only the default scopes. Applies from the scout's next run.
+ * @maxItems 12
*/
write_scopes?: string[];
/** Opt-in guard on this scout's lifecycle. Off by default, so anyone with scout write access may pause, resume, switch the scout to dry run, or delete it. On, only the person the scout's runs act as or a project admin may do any of those, or change this flag. Use it on a scout whose output people depend on: `signal_scout:write` is a project-wide scope held by people and by unattended agents alike, and a resume has to pass the project's enabled-scout maximum that a pause does not, so a bulk pause is not undone in one step. The lock never stops an automatic pause, such as the inactivity sweep or the repeated-failure breaker. */
diff --git a/services/mcp/src/generated/replay_vision/api.ts b/services/mcp/src/generated/replay_vision/api.ts
index 85d0a8099616..eca933b3d100 100644
--- a/services/mcp/src/generated/replay_vision/api.ts
+++ b/services/mcp/src/generated/replay_vision/api.ts
@@ -1798,7 +1798,7 @@ export const visionScannersScoutsCreateBodyConfigOneRepositoriesItemMax = 255
export const visionScannersScoutsCreateBodyConfigOneRepositoriesMax = 10
-export const visionScannersScoutsCreateBodyConfigOneWriteScopesMax = 11
+export const visionScannersScoutsCreateBodyConfigOneWriteScopesMax = 12
export const visionScannersScoutsCreateBodyConfigOnePrecheckQueryMax = 10000
@@ -1885,7 +1885,7 @@ export const VisionScannersScoutsCreateBody = () => zod
.max(visionScannersScoutsCreateBodyConfigOneWriteScopesMax)
.optional()
.describe(
- "Extra write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. Empty (the default) means the scout reads the project and writes only what every scout may write: notebooks, its findings, and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant. Applies from the scout's next run."
+ "Write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `notebook:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. A new scout starts with `notebook:write` when this field is omitted. Empty means the scout reads the project and writes only its findings and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant, and a run that acts as a project member other than the author holds only the default scopes. Applies from the scout's next run."
),
lifecycle_locked: zod
.boolean()
diff --git a/services/mcp/src/generated/signals/api.ts b/services/mcp/src/generated/signals/api.ts
index 71fb47157cd5..6faa69f8572e 100644
--- a/services/mcp/src/generated/signals/api.ts
+++ b/services/mcp/src/generated/signals/api.ts
@@ -911,7 +911,7 @@ export const signalsScoutCreateBodyConfigOneRepositoriesItemMax = 255
export const signalsScoutCreateBodyConfigOneRepositoriesMax = 10
-export const signalsScoutCreateBodyConfigOneWriteScopesMax = 11
+export const signalsScoutCreateBodyConfigOneWriteScopesMax = 12
export const signalsScoutCreateBodyConfigOnePrecheckQueryMax = 10000
@@ -1015,7 +1015,7 @@ export const SignalsScoutCreateBody = () => zod
.max(signalsScoutCreateBodyConfigOneWriteScopesMax)
.optional()
.describe(
- "Extra write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. Empty (the default) means the scout reads the project and writes only what every scout may write: notebooks, its findings, and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant. Applies from the scout's next run."
+ "Write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `notebook:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. A new scout starts with `notebook:write` when this field is omitted. Empty means the scout reads the project and writes only its findings and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant, and a run that acts as a project member other than the author holds only the default scopes. Applies from the scout's next run."
),
lifecycle_locked: zod
.boolean()
@@ -1207,7 +1207,7 @@ export const signalsScoutConfigCreateBodyRepositoriesItemMax = 255
export const signalsScoutConfigCreateBodyRepositoriesMax = 10
-export const signalsScoutConfigCreateBodyWriteScopesMax = 11
+export const signalsScoutConfigCreateBodyWriteScopesMax = 12
export const signalsScoutConfigCreateBodyPrecheckQueryMax = 10000
@@ -1271,7 +1271,7 @@ export const SignalsScoutConfigCreateBody = () => zod
.max(signalsScoutConfigCreateBodyWriteScopesMax)
.optional()
.describe(
- "Extra write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. Empty (the default) means the scout reads the project and writes only what every scout may write: notebooks, its findings, and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant. Applies from the scout's next run."
+ "Write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `notebook:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. A new scout starts with `notebook:write` when this field is omitted. Empty means the scout reads the project and writes only its findings and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant, and a run that acts as a project member other than the author holds only the default scopes. Applies from the scout's next run."
),
lifecycle_locked: zod
.boolean()
@@ -1451,7 +1451,7 @@ export const signalsScoutConfigUpdateBodyRepositoriesItemMax = 255
export const signalsScoutConfigUpdateBodyRepositoriesMax = 10
-export const signalsScoutConfigUpdateBodyWriteScopesMax = 11
+export const signalsScoutConfigUpdateBodyWriteScopesMax = 12
export const signalsScoutConfigUpdateBodyPrecheckQueryMax = 10000
@@ -1607,7 +1607,7 @@ export const SignalsScoutConfigUpdateBody = () => zod
.max(signalsScoutConfigUpdateBodyWriteScopesMax)
.optional()
.describe(
- "Extra write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. Empty (the default) means the scout reads the project and writes only what every scout may write: notebooks, its findings, and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant. Applies from the scout's next run."
+ "Write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `notebook:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. A new scout starts with `notebook:write` when this field is omitted. Empty means the scout reads the project and writes only its findings and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant, and a run that acts as a project member other than the author holds only the default scopes. Applies from the scout's next run."
),
precheck_query: zod
.string()
diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/scout-config-create.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/scout-config-create.json
index a3cc5ab1cafb..9c4fcb908ea6 100644
--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/scout-config-create.json
+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/scout-config-create.json
@@ -213,11 +213,11 @@
"type": "string"
},
"write_scopes": {
- "description": "Extra write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. Empty (the default) means the scout reads the project and writes only what every scout may write: notebooks, its findings, and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant. Applies from the scout's next run.",
+ "description": "Write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `notebook:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. A new scout starts with `notebook:write` when this field is omitted. Empty means the scout reads the project and writes only its findings and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant, and a run that acts as a project member other than the author holds only the default scopes. Applies from the scout's next run.",
"items": {
"type": "string"
},
- "maxItems": 11,
+ "maxItems": 12,
"type": "array"
}
},
diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/scout-config-update.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/scout-config-update.json
index 4b98132fd4a4..93d443e09cb1 100644
--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/scout-config-update.json
+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/scout-config-update.json
@@ -219,11 +219,11 @@
"type": "string"
},
"write_scopes": {
- "description": "Extra write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. Empty (the default) means the scout reads the project and writes only what every scout may write: notebooks, its findings, and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant. Applies from the scout's next run.",
+ "description": "Write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `notebook:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. A new scout starts with `notebook:write` when this field is omitted. Empty means the scout reads the project and writes only its findings and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant, and a run that acts as a project member other than the author holds only the default scopes. Applies from the scout's next run.",
"items": {
"type": "string"
},
- "maxItems": 11,
+ "maxItems": 12,
"type": "array"
}
},
diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/scout-create.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/scout-create.json
index 53bcae77862d..1cbdf6cf37e9 100644
--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/scout-create.json
+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/scout-create.json
@@ -210,11 +210,11 @@
"type": "string"
},
"write_scopes": {
- "description": "Extra write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. Empty (the default) means the scout reads the project and writes only what every scout may write: notebooks, its findings, and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant. Applies from the scout's next run.",
+ "description": "Write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `notebook:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. A new scout starts with `notebook:write` when this field is omitted. Empty means the scout reads the project and writes only its findings and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant, and a run that acts as a project member other than the author holds only the default scopes. Applies from the scout's next run.",
"items": {
"type": "string"
},
- "maxItems": 11,
+ "maxItems": 12,
"type": "array"
}
},
diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/signals-scout-config-create.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/signals-scout-config-create.json
index a3cc5ab1cafb..9c4fcb908ea6 100644
--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/signals-scout-config-create.json
+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/signals-scout-config-create.json
@@ -213,11 +213,11 @@
"type": "string"
},
"write_scopes": {
- "description": "Extra write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. Empty (the default) means the scout reads the project and writes only what every scout may write: notebooks, its findings, and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant. Applies from the scout's next run.",
+ "description": "Write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `notebook:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. A new scout starts with `notebook:write` when this field is omitted. Empty means the scout reads the project and writes only its findings and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant, and a run that acts as a project member other than the author holds only the default scopes. Applies from the scout's next run.",
"items": {
"type": "string"
},
- "maxItems": 11,
+ "maxItems": 12,
"type": "array"
}
},
diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/signals-scout-config-update.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/signals-scout-config-update.json
index 4b98132fd4a4..93d443e09cb1 100644
--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/signals-scout-config-update.json
+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/signals-scout-config-update.json
@@ -219,11 +219,11 @@
"type": "string"
},
"write_scopes": {
- "description": "Extra write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. Empty (the default) means the scout reads the project and writes only what every scout may write: notebooks, its findings, and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant. Applies from the scout's next run.",
+ "description": "Write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `notebook:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. A new scout starts with `notebook:write` when this field is omitted. Empty means the scout reads the project and writes only its findings and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant, and a run that acts as a project member other than the author holds only the default scopes. Applies from the scout's next run.",
"items": {
"type": "string"
},
- "maxItems": 11,
+ "maxItems": 12,
"type": "array"
}
},
diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/vision-scanners-scouts-create.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/vision-scanners-scouts-create.json
index 52a2fe29a0cb..88e0a77939ee 100644
--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/vision-scanners-scouts-create.json
+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/vision-scanners-scouts-create.json
@@ -209,11 +209,11 @@
"type": "string"
},
"write_scopes": {
- "description": "Extra write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. Empty (the default) means the scout reads the project and writes only what every scout may write: notebooks, its findings, and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant. Applies from the scout's next run.",
+ "description": "Write access granted to this one scout, as scope strings. The grantable set is `alert:write`, `annotation:write`, `canvas:write`, `customer_task:write`, `dashboard:write`, `hog_flow_proposal:write`, `insight:write`, `llm_skill:write`, `notebook:write`, `replay_scanner:write`, `warehouse_table:write`, `warehouse_view:write`. A new scout starts with `notebook:write` when this field is omitted. Empty means the scout reads the project and writes only its findings and its own memory. Each scope is project-wide and object-level, so a scout holding `dashboard:write` can update or delete any dashboard in the project, not only ones it made. Grant only what this scout maintains. Only the person the scout's runs act as (whoever authored it) or a project admin can set it, and a scoped API key must itself carry each scope it grants. A dry run (`emit=false`) never holds the grant, and a run that acts as a project member other than the author holds only the default scopes. Applies from the scout's next run.",
"items": {
"type": "string"
},
- "maxItems": 11,
+ "maxItems": 12,
"type": "array"
}
},