Skip to content

fix(security): isolate structured-output sessions from agent tools - #197

Merged
tickernelz merged 1 commit into
tickernelz:mainfrom
EyJunge1:fix/structured-output-tool-isolation
Jul 30, 2026
Merged

fix(security): isolate structured-output sessions from agent tools#197
tickernelz merged 1 commit into
tickernelz:mainfrom
EyJunge1:fix/structured-output-tool-isolation

Conversation

@EyJunge1

@EyJunge1 EyJunge1 commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

Test plan

  • bun test tests/opencode-provider.test.ts tests/plugin-host-config.test.ts (38 pass)
  • Confirm internal capture/profile sessions can still produce structured output (unit coverage for successful structured parse + session create/prompt/delete)
  • Confirm ordinary tools (bash, read, memory, etc.) are not available to those sessions (tools: { "*": false, StructuredOutput: true } + deny-by-default permissions asserted in tests)
  • Confirm a timed-out / failed structured-output call fails closed without unbounded looping (times out, aborts, and deletes when the prompt never returns)

Prevent internal capture/profile sessions from inheriting unrestricted
OpenCode tools and looping indefinitely (issue tickernelz#189) via least-privilege
permissions, a step-capped agent, and a hard timeout.

Co-authored-by: Cursor <cursoragent@cursor.com>
@EyJunge1
EyJunge1 force-pushed the fix/structured-output-tool-isolation branch from 132d76e to dd953b9 Compare July 28, 2026 12:45
@tickernelz
tickernelz merged commit efe3d12 into tickernelz:main Jul 30, 2026
5 checks passed
@tickernelz

Copy link
Copy Markdown
Owner

Merged into main as part of the newest-to-oldest integration batch and scheduled for the v2.22.0 release.

The combined four-PR tree was verified with:

  • bun install --frozen-lockfile
  • cd web && bun install --frozen-lockfile
  • bun run typecheck
  • bun run build (including the React/Vite production bundle)
  • bun test287 passed / 0 failed / 631 assertions
  • git diff --check

The pushed main tree exactly matches the locally tested synthetic merge tree.

@tickernelz

Copy link
Copy Markdown
Owner

Released in v2.22.0. The npm registry artifact was downloaded, checksum-verified, installed with lifecycle scripts disabled, and passed native dependency, libSQL vector, package entrypoint, and bundled web UI checks.

@EyJunge1
EyJunge1 deleted the fix/structured-output-tool-isolation branch July 30, 2026 09:47
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.

Security: internal structured-output sessions can inherit unrestricted tools and loop indefinitely

2 participants