Skip to content

Docs: reward-hacking scan surfaces (#46) and task-scoped guard profiles / guard lock (#48, #47) #50

Open

Description

@jflowers

Documentation gate issue for the user-facing change in the scope-reward-hacking-check change (#46, PR #49).

User-facing change shipped on opsx/scope-reward-hacking-check:

  • FR-071: reward-hacking check scans execution surfaces only. Bash is scanned in full; the read-only builtins (read, glob, grep, webfetch, websearch) are not scanned; every other tool keeps every non-content key scanned, never scans oldString, and scans content/newString unless the call has no file target or every target is a prose document (.md, .mdx, .markdown, .txt, .rst, .adoc). Writing about --no-verify in a note or Markdown page now passes. Edits that remove a .skip( are no longer blocked. Writing a marker into a script, test, hook, or workflow still blocks.
  • Config guidance changes: knowledge-curation sessions no longer need blockRewardHacking: false. Docs should steer users away from disabling the knob in project config.

Doc surfaces already updated in-branch (verify accuracy after merge): README Section 4.2 (tool guard) and the blockRewardHacking knob-table row, CHANGELOG Unreleased, AGENTS.md tool-guard architecture bullet.

Follow-ups worth doing post-merge:


Also covers: task-scoped guard profiles and guard lock (#48, #47, PR #51)

User-facing changes from opsx/agent-guard-overrides (FR-072..FR-075):

  • profiles, honored only from the global config file (${XDG_CONFIG_HOME:-~/.config}/opencode/supervisor/config.json). Each profile has:

    • a match on command (the session's latest slash command, without /) and/or agent (the latest user message's agent);
    • an optional name;
    • a traceCheck.exemptTools list of tool-name globs.

    A profile applies to a session when it matches that session or any ancestor (subagents inherit, up to 8 levels). Matching calls skip the file-path trace check only; reward-hacking, directive, protected-state and gate checks still apply.

    • Globs matching a file-mutating builtin (bash, edit, write, patch, multiedit, apply_patch, so * too) and unknown keys drop the profile with a warning.
    • profiles in a project config file or plugin options is ignored with a warning.
  • lockGuards: true, honored only from the global config file. It strips blockRewardHacking: false, requireStepReferenceInTools: false and mode: "repair-only" from the project config file and plugin options, with a warning. The environment and the global file stay authoritative.

  • Logging: the identity log line now reports lockGuards=<bool> and the profile names, and an applied exemption logs once per profile and tool.

  • Fleet guidance (gh-hud starts every unattended session as autonomy): match on command to scope a grant to one dispatched task. Deploy the global file per machine; no restarts are needed per task.

  • Config guidance changes: stop recommending requireStepReferenceInTools: false in project config for knowledge-curation work. Recommend a global command or agent profile instead, plus lockGuards: true.

Doc surfaces already updated in-branch (verify accuracy after merge): the README Section 7 knob table, Section 7.2 (guard profiles and the guard lock), Section 4.2 and the hook map, CHANGELOG Unreleased (Added), and the AGENTS.md structure and architecture bullets.

Follow-ups worth doing post-merge:

  • Document the residual risk: a repository that defines its own agent or command with a granted name inherits the grant, and a command grant lasts for the rest of its session.
  • Cross-link from Dewey's curator docs (unbound-force/website docs issues) to the supervisor's Section 7.2.

Activity

  1. added
    documentation
    on Nov 3, 2026
  2. added 2 commits that reference this issue on Nov 3, 2026
  3. changed the title [-]Docs: document FR-071 reward-hacking scan surfaces (#46)[/-] [+]Docs: reward-hacking scan surfaces (#46) and per-agent overrides / guard lock (#48, #47)[/+] on Nov 12, 2026
  4. changed the title [-]Docs: reward-hacking scan surfaces (#46) and per-agent overrides / guard lock (#48, #47)[/-] [+]Docs: reward-hacking scan surfaces (#46) and task-scoped guard profiles / guard lock (#48, #47)[/+] on Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions