Skip to content

Let the operator open agent to Slack, behind a double opt-in - #27

Merged
Shashankss1205 merged 1 commit into
mainfrom
feat/slack-agent-optin
Jul 30, 2026
Merged

Let the operator open agent to Slack, behind a double opt-in#27
Shashankss1205 merged 1 commit into
mainfrom
feat/slack-agent-optin

Conversation

@Shashankss1205

Copy link
Copy Markdown
Collaborator

agent from Slack, off by default, on only when the operator sets both GRAPHARC_SLACK_ALLOW_AGENT=1 (it acts on the host) and GRAPHARC_SLACK_ALLOW_MODEL=1 (it cannot run spend-free). Either switch alone keeps it off, and the refusal message names both.

When on, the gate still dictates the shape of every Slack-launched agent:

  • executor pinned to sandbox--executor is not admitted, so local is unreachable
  • --system-prompt not admitted
  • workspace defaults to <workdir>/agent (the CLI mkdirs it) instead of the CLI's fresh temp dir, so trace.jsonl and outputs stay readable from Slack; an explicit --workspace is confined like every other path
  • --max-seconds defaults to ten seconds under the bot's timeout, so the CLI's graceful interrupt-and-report fires before the bot's hard kill
  • --allow/--deny tool globs pass through and are repeatable

Eight new gate tests (double-switch enforcement, injected defaults, no-override of explicit values, executor/system-prompt/path-escape refusals, repeatable globs); the startup line now reports agent on/off; cookbook 07 gains "The agent opt-in" section and 08's refusal bullet is updated. Full suite green, ruff clean.

🤖 Generated with Claude Code

`agent` is the command with file tools, which is exactly why it was
excluded: it acts on the host on behalf of anyone in the workspace.
It now sits behind two switches rather than zero —
GRAPHARC_SLACK_ALLOW_AGENT because it acts, and the existing
GRAPHARC_SLACK_ALLOW_MODEL because it cannot run spend-free. One
without the other stays off, and the refusal names both.

Once on, the gate still decides the shape of every Slack-launched
agent: the executor stays sandbox (--executor is not admitted),
--system-prompt is unreachable, the workspace defaults into the bot's
working directory instead of the CLI's fresh temp dir so the run's
trace can be read back from Slack, and --max-seconds defaults to ten
seconds under the bot's timeout so the CLI's graceful interrupt fires
before the bot's kill. --allow/--deny globs pass through, repeatable.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Shashankss1205
Shashankss1205 merged commit 9ea15bd into main Jul 30, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant