Agent tools CLI
API reference for the `143-tools` commands available to coding agents.
Coding agents call 143-tools from inside the sandbox to query connected integrations without handling provider credentials directly. The available commands depend on which integrations are configured for the session, so 143-tools --help is the source of truth at runtime.
Use this page as a lookup table. For task flows, start with the guide for the integration or preview workflow you are configuring.
CLI contract
Agent-facing commands use a hierarchical shape:
143-tools <namespace> <action> [--flag value ...]
143-tools <namespace> --help
143-tools <namespace> <action> --help
143-tools --helpResults are printed to stdout, usually as JSON. Flags map directly to the tool input schema. Array flags use comma-separated values, for example --states triage,in_progress. Boolean flags accept true or false.
Flat command names such as sentry_list_errors, linear_get_task, log_query, and create_pr are no longer supported. Error messages include the new command shape and the help command the agent should run next.
Use jq when scanning result sets:
143-tools linear list_tasks --team ENG --limit 25 | jq '.[].identifier'Namespaces
Only configured namespaces appear in 143-tools --help.
| Namespace | Commands |
|---|---|
sentry | list_errors, get_error, get_error_trend, find_related_errors |
linear | list_tasks, get_task, find_related_tasks, update_task, create_task |
notion | search_documents, get_document |
github | list_recent_prs, get_pr_reviews |
circleci | list_flaky_tests, get_job_test_results, get_recent_test_failures |
logs | query, context, fields, stats |
preview | create, ensure, status, list, stop, restart, update, observe, act, control, request_handoff, screenshot, console, inspect, interact, multi_viewport, visual_diff, assert |
slack | search_messages, get_thread, send |
issue | create |
pr | create |
project | propose |
eval | add |
code-review-history | list, get, policy, update_policy |
Error tracking
These commands are exposed for configured error trackers such as Sentry. The namespace uses the provider name.
sentry list_errors
List unresolved errors with severity, occurrence count, and affected-user summaries.
| Flag | Type | Required | Description |
|---|---|---|---|
--project | string | No | Project slug to filter by. |
--severity | critical | high | medium | low | No | Severity filter. |
--since | string | No | ISO 8601 lower bound for last seen time. |
--limit | number | No | Max results. Defaults to 25. |
Common use: start a production bug investigation with high-impact unresolved errors.
143-tools sentry list_errors --severity critical --limit 20sentry get_error
Get full details for one error, including stack trace, tags, and error type.
| Flag | Type | Required | Description |
|---|---|---|---|
--error_id | string | Yes | Error or issue ID from the provider. |
Common use: inspect the stack and tags before searching the codebase.
143-tools sentry get_error --error_id 12345sentry get_error_trend
Get occurrence trend data over a time window.
| Flag | Type | Required | Description |
|---|---|---|---|
--error_id | string | Yes | Error or issue ID from the provider. |
--period | string | No | Duration such as 24h, 7d, or 14d. Defaults to 14d. |
Common use: decide whether a suspected fix should be urgent because the error is spiking.
143-tools sentry get_error_trend --error_id 12345 --period 24hsentry find_related_errors
Find errors that likely share a root cause, such as a matching stack prefix or culprit.
| Flag | Type | Required | Description |
|---|---|---|---|
--error_id | string | Yes | Error or issue ID from the provider. |
Common use: avoid fixing one symptom while missing duplicate production failures.
143-tools sentry find_related_errors --error_id 12345Tasks
These commands are exposed for configured task managers such as Linear. The namespace uses the provider name.
linear list_tasks
List tasks matching filters with state, priority, and assignee summaries.
| Flag | Type | Required | Description |
|---|---|---|---|
--team | string | No | Team key, such as ENG. |
--states | comma-separated strings | No | State names such as triage,backlog,in_progress. |
--priority | urgent | high | medium | low | No | Priority filter. |
--limit | number | No | Max results. Defaults to 25. |
Common use: find the highest-priority engineering work related to the current repo.
143-tools linear list_tasks --team ENG --priority urgent --limit 25linear get_task
Get full task details, including description, comments, and linked issues.
| Flag | Type | Required | Description |
|---|---|---|---|
--task_id | string | Yes | Task ID or identifier, such as ENG-123. |
Common use: read the complete ticket before implementing a fix.
143-tools linear get_task --task_id ENG-123linear find_related_tasks
Find linked tasks, sub-issues, or tasks in the same project.
| Flag | Type | Required | Description |
|---|---|---|---|
--task_id | string | Yes | Task ID or identifier. |
Common use: check whether another task already covers the same root cause.
143-tools linear find_related_tasks --task_id ENG-123linear update_task
Update task metadata or add a comment.
| Flag | Type | Required | Description |
|---|---|---|---|
--task_id | string | Yes | Task ID or identifier. |
--priority | urgent | high | medium | low | No | New priority. |
--state | string | No | Target state name. |
--comment | string | No | Comment to add. |
Common use: leave an implementation note or move a task after completing work.
143-tools linear update_task --task_id ENG-123 --comment "Opened a PR with the fix."linear create_task
Create a new task.
| Flag | Type | Required | Description |
|---|---|---|---|
--title | string | Yes | Task title. |
--team_key | string | Yes | Team key, such as ENG. |
--description | string | No | Markdown description. |
--priority | urgent | high | medium | low | No | Priority. |
--labels | comma-separated strings | No | Labels to apply. |
Common use: create follow-up work discovered during a code change.
143-tools linear create_task --team_key ENG --title "Add regression coverage for webhook retries" --priority highDocuments
These commands are exposed for configured document stores such as Notion.
notion search_documents
Search documents by text query.
| Flag | Type | Required | Description |
|---|---|---|---|
--query | string | Yes | Search query text. |
--workspace | string | No | Workspace or space to search within. |
--limit | number | No | Max results. Defaults to 10. |
Common use: find design docs, RFCs, postmortems, or launch plans before changing behavior.
143-tools notion search_documents --query "webhook retry policy" --limit 10notion get_document
Fetch a document's full content.
| Flag | Type | Required | Description |
|---|---|---|---|
--doc_id | string | Yes | Document ID from search results. |
Common use: read the authoritative product or architecture context for a change.
143-tools notion get_document --doc_id abc-123Code review
These commands are exposed for configured code review sources such as GitHub.
github list_recent_prs
List recent pull requests with titles, authors, review status, and change size.
| Flag | Type | Required | Description |
|---|---|---|---|
--state | merged | open | closed | No | PR state. Defaults to merged. |
--limit | number | No | Max results. Defaults to 20. |
Common use: learn recent local patterns before editing the same area.
143-tools github list_recent_prs --state merged --limit 20github get_pr_reviews
Get reviews and inline review comments for a PR.
| Flag | Type | Required | Description |
|---|---|---|---|
--pr_number | number | Yes | Pull request number. |
Common use: inspect prior reviewer feedback so a new change follows accepted conventions.
143-tools github get_pr_reviews --pr_number 1234CI test insights
These commands are exposed for configured CI providers such as CircleCI.
circleci list_flaky_tests
List flaky tests detected by CircleCI.
| Flag | Type | Required | Description |
|---|---|---|---|
--branch | string | No | Restrict to flakes seen on this branch. |
--workflow_name | string | No | Restrict to a workflow. |
--limit | number | No | Max results. Defaults to the provider's full list. |
Common use: choose a flaky test to investigate when CI is unstable.
143-tools circleci list_flaky_tests --limit 25circleci get_job_test_results
Fetch individual test results and failure messages for one CI job.
| Flag | Type | Required | Description |
|---|---|---|---|
--job_number | number | Yes | CI job number. |
Common use: read the exact failure output for a flaky occurrence.
143-tools circleci get_job_test_results --job_number 123456circleci get_recent_test_failures
Get recent failure occurrences for a test, including failure messages.
| Flag | Type | Required | Description |
|---|---|---|---|
--test_name | string | Yes | Test function or case name. |
--classname | string | No | Class or file grouping, recommended for disambiguation. |
--limit | number | No | Max occurrences. Defaults to 5. |
Common use: compare failure messages across runs before changing a test.
143-tools circleci get_recent_test_failures --test_name "TestWebhookRetries" --limit 5Logs
Log commands use a shared logs namespace with a --provider flag. Configured providers can include victorialogs and mezmo.
logs query
Run a read-only provider-native log query over a bounded time range.
| Flag | Type | Required | Description |
|---|---|---|---|
--query | string | Yes | Provider-native query text. |
--provider | string | No | Log provider to use when more than one is configured. |
--since | string | Conditional | Duration such as 15m, 1h, or 7d. Required unless --start_time/--end_time are provided. |
--start_time | string | No | RFC3339 lower bound. |
--end_time | string | No | RFC3339 upper bound. |
--limit | number | No | Max results. Defaults to 100, max 1000. |
--direction | desc | asc | No | Result order. Defaults to desc. |
--fields | comma-separated strings | No | Field names to include. |
--include_raw | boolean | No | Request redacted raw provider payloads when authorized. |
Common use: investigate recent API errors with a bounded production log search.
143-tools logs query --provider victorialogs --query 'service:api AND level:error' --since 1h --limit 100logs context
Fetch neighboring logs around an event anchor. At least one of --id, --cursor, or --timestamp is required. Using --timestamp also requires --query.
| Flag | Type | Required | Description |
|---|---|---|---|
--id | string | Conditional | Stable event or log ID anchor. |
--cursor | string | Conditional | Opaque event cursor anchor. |
--timestamp | string | Conditional | RFC3339 timestamp anchor. Requires --query. |
--query | string | No | Provider-native query text. |
--provider | string | No | Log provider to use. |
--since | string | No | Bounded lookback window. |
--start_time | string | No | RFC3339 lower bound. |
--end_time | string | No | RFC3339 upper bound. |
--before | number | No | Logs before the target. Defaults to 20, max 100. |
--after | number | No | Logs after the target. Defaults to 20, max 100. |
--fields | comma-separated strings | No | Field names to include. |
--include_raw | boolean | No | Request redacted raw provider payloads when authorized. |
Common use: expand from one failed request to the surrounding request lifecycle.
143-tools logs context --provider victorialogs --query 'request_id:"req_123"' --timestamp 2026-06-05T12:00:00Z --since 15m --before 25 --after 25logs fields
List common indexed or queryable fields for a provider.
| Flag | Type | Required | Description |
|---|---|---|---|
--provider | string | No | Log provider to use. |
--query | string | No | Optional provider-native query. |
--since | string | No | Lookback window. Defaults to 24h, max 7d. |
--limit | number | No | Max field names or sampled records. Defaults to 100. |
Common use: discover available fields before composing a precise log query.
143-tools logs fields --provider victorialogs --since 24h --limit 100logs stats
Run lightweight provider-native aggregate log stats. This command appears only for providers that support stats.
| Flag | Type | Required | Description |
|---|---|---|---|
--query | string | Yes | Provider-native query text. |
--provider | string | No | Log provider to use. |
--since | string | Conditional | Duration such as 15m, 1h, or 7d. Required unless --start_time/--end_time are provided. |
--start_time | string | No | RFC3339 lower bound. |
--end_time | string | No | RFC3339 upper bound. |
--group_by | comma-separated strings | No | Field names to group by. |
--interval | string | No | Time bucket interval, such as 5m or 1h. |
--limit | number | No | Max grouped rows. Defaults to 100. |
Common use: group errors by service, org, or endpoint before drilling into raw logs.
143-tools logs stats --provider victorialogs --query 'level:error' --since 1h --group_by service --limit 20Previews
Preview commands use 143's platform-controlled preview lifecycle and browser inspector. Inside a coding-agent sandbox, session-scoped commands default to CODING_SESSION_ID, so screenshots and browser checks run against the live session workspace before the branch is published. Browser diagnostics also accept an explicit --session-id or --preview-id.
preview create
Create or reuse a preview.
| Flag | Type | Required | Description |
|---|---|---|---|
--session-id | string | Conditional | Session UUID for a session preview. Recommended for agent iteration. |
--repository | string | Conditional | Repository full name or unique short name for a branch preview. |
--branch | string | Conditional | Pushed branch name for a branch preview. |
--wait | boolean | No | Wait until the preview is ready or fails. |
143-tools preview create --session-id "$CODING_SESSION_ID" --wait
143-tools preview create --repository example-org/example-app --branch feature/foo --waitpreview ensure, preview observe, and preview act
Coding-agent sessions can use the native verification loop without passing a preview or session ID:
143-tools preview ensure --wait
143-tools preview observe --path /
143-tools preview act --steps '[{"action":"click","role":"button","name":"Save"}]'
143-tools preview update --waitobserve returns screenshot reference metadata, URL, title, viewport, capture
time, a bounded accessibility tree, optional bounded DOM, readiness and browser
restoration status, and error-level console messages after the supplied cursor. Pass
--output path/to/image.png to write the image into the workspace without
keeping base64 in command output. act accepts structured actions such
as navigate, click, fill/type, select, check/uncheck, press, hover, scroll,
wait for selector/URL/text/readiness/network idle, coordinate click, and
viewport changes, then returns the action result and a fresh observation.
Navigation is restricted to the active preview origin and the repository's
browser.allowed_paths policy.
Use preview control to inspect whether the agent, a human, or a pending
handoff owns browser input. When login, MFA, CAPTCHA, or human judgment is
required, call:
143-tools preview request_handoff --reason "MFA approval required"This pauses agent actions until an authorized user takes control in the session preview panel and returns it. The browser URL, cookies, and local storage remain on the same session-owned context throughout the handoff.
preview status
Read status, URL, freshness, and the recommended update mode.
| Flag | Type | Required | Description |
|---|---|---|---|
--session-id | string | Conditional | Session UUID for the active session preview. |
--preview-id | string | Conditional | Preview UUID for a branch preview. |
143-tools preview status --session-id "$CODING_SESSION_ID"preview update
Make a session preview reflect recent workspace edits. The platform selects the fastest safe path: browser reload, soft service restart, full recycle, cold relaunch, or no-op. Config overrides escalate to full recycle.
| Flag | Type | Required | Description |
|---|---|---|---|
--session-id | string | No in a coding-agent sandbox | Session UUID. Defaults to CODING_SESSION_ID in a coding-agent sandbox. |
--path | string | No | Path to reload/check. Defaults to /. |
--wait | boolean | No | Wait when a restart is started. |
--force-mode | string | No | Diagnostic override: browser_reload, soft_service_restart, full_recycle, cold_relaunch, or noop_current. |
--reload-browser | boolean | No | Reload the browser context when possible. Defaults to true. |
--config | JSON string | No | Optional preview config override. |
143-tools preview update --session-id "$CODING_SESSION_ID" --waitBrowser Inspection
Use these after creating or updating a preview. Pass either --session-id or --preview-id.
| Command | Required flags | Purpose |
|---|---|---|
preview screenshot | target | Capture a screenshot. Optional flags: --path, --viewport-w, --viewport-h, --full-page, --delay-ms, --inline-base64. Responses include capture.url, repeated under the former artifact key during the current rollout. |
preview console | target | Read browser console messages. Optional --level error filters output. |
preview inspect | target plus --selector or --x/--y | Inspect DOM metadata for an element. |
preview interact | target, --steps | Execute browser actions from a JSON step array. Step timeouts accept timeout_ms. |
preview multi_viewport | target | Capture mobile, tablet, and desktop screenshots, or pass --viewports JSON. Each capture includes stored-reference metadata. |
preview visual_diff | target, --before-snapshot-id, --after-snapshot-id | Compare two stored preview snapshots. |
preview assert | target, --assertions | Run browser assertions from a JSON assertion array. |
143-tools preview screenshot --session-id "$CODING_SESSION_ID" --path / --viewport-w 1280 --viewport-h 720 --inline-base64 false
143-tools preview inspect --session-id "$CODING_SESSION_ID" --selector '[data-testid=save]'
143-tools preview interact --session-id "$CODING_SESSION_ID" --steps '[{"action":"click","selector":"[data-testid=save]","screenshot":true}]'
143-tools preview multi_viewport --session-id "$CODING_SESSION_ID" --path /
143-tools preview console --session-id "$CODING_SESSION_ID" --level errorMessaging
These commands are exposed for configured message sources such as Slack.
slack search_messages
Search messages by text query.
| Flag | Type | Required | Description |
|---|---|---|---|
--query | string | Yes | Search query text. |
--channel | string | No | Channel name or ID. |
--limit | number | No | Max results. Defaults to 10. |
Common use: find user reports, incident discussion, or rollout context.
143-tools slack search_messages --query "checkout timeout" --limit 10slack get_thread
Get a full conversation thread.
| Flag | Type | Required | Description |
|---|---|---|---|
--message_id | string | Yes | Message ID of the thread root. |
Common use: read the full discussion around a bug report before coding.
143-tools slack get_thread --message_id msg-456slack send
Send a plain-text Slack message through 143's platform-managed Slack connection. This command appears only when the session or automation has the Slack notification capability.
| Flag | Type | Required | Description |
|---|---|---|---|
--channel-id | string | Yes | Slack channel ID to send to, such as C123. |
--text | string | Yes | Plain-text message body. |
Common use: post automation completion or status updates to a channel chosen by the automation owner.
143-tools slack send --channel-id C123 --text "Automation completed successfully."The command returns delivery state and Slack message coordinates:
{"status":"sent","channel_id":"C123","message_ts":"1700000000.000100"}143 workflow tools
These commands are exposed by 143 itself when the session has the matching capability.
issue create
Create a new engineering issue and return its UUID.
| Flag | Type | Required | Description |
|---|---|---|---|
--title | string | Yes | Concise issue title. |
--description | string | Yes | Detailed context and evidence. |
--severity | info | warning | error | critical | No | Issue severity. Defaults to info. |
--tags | comma-separated strings | No | Tags to categorize the issue. |
Common use: file follow-up work from an agent investigation.
143-tools issue create --title "Webhook retries drop idempotency key" --description "Observed while fixing ENG-123." --severity warningpr create
Queue first-class 143 pull request creation for the current session.
| Flag | Type | Required | Description |
|---|---|---|---|
--session_id | string | No | Compatibility override. Normally omit it: the backend derives the current session from the signed tool token. If supplied, it must match that token. |
--draft | boolean | No | Whether to create a draft PR. Omit to use the repo default. |
--author_mode | auto | app | user | No | PR author mode. Omit to use the default. |
Common use: open a PR through the same workflow as the app after tests pass.
143-tools pr create --draft falseThis command queues the durable 143 publication workflow; it does not call the GitHub PR API from the sandbox. Sandbox GitHub API access is read-only for pull requests, while git push uses a separate repository-bound contents token.
The command returns the workflow's actual asynchronous status:
review_in_progress, pr_queued, already_published,
manual_publication_required, or blocked. A running review or queued
publication is not a created pull request; report the returned state and wait
for the session Overview to converge.
pr update
Update the title and/or Markdown description of the current session's existing primary Pull Request.
| Flag | Type | Required | Description |
|---|---|---|---|
--session-id | string | No | Compatibility override. Normally omit it; if supplied, it must match the signed current-session token. |
--title | string | No | Replacement Pull Request title. |
--body | string | No | Replacement Markdown description. Mutually exclusive with --body-file. |
--body-file | path | No | Read the replacement Markdown description from a file inside the sandbox. Mutually exclusive with --body. |
At least one of --title, --body, or --body-file is required. Prefer a
file for substantial descriptions:
143-tools pr update --body-file /tmp/pr-description.mdThe server verifies that the Pull Request belongs to the token-scoped session
and repository, updates GitHub with the server-held App installation, preserves
143's hidden publication marker and preview footer, refreshes the local PR mirror, and records an
agent audit event. The sandbox's raw GitHub token remains read-only for Pull
Requests, so gh pr edit is intentionally not a substitute for this command.
eval add
Add a candidate eval task from a session launched by the eval settings bootstrap flow. This namespace is not exposed to ordinary coding sessions.
| Flag | Type | Required | Description |
|---|---|---|---|
--pr_number | number | Yes | Source pull request number. |
--pr_title | string | Yes | Source pull request title. |
--base_commit_sha | string | Yes | Commit SHA before the fix. |
--solution_commit_sha | string | Yes | Commit SHA containing the fix. |
--solution_diff | string | Yes | Diff that solved the issue. |
--issue_description | string | Yes | Reproducible eval task prompt. |
--scoring_criteria | string | Yes | JSON array of scoring criteria. |
--complexity | trivial | simple | moderate | complex | Yes | Candidate task complexity. |
--fitness_score | number | Yes | Candidate quality score from 0 to 1. |
--fitness_reasoning | string | Yes | Why the candidate is useful for regression protection. |
--evidence | string | No | Optional JSON evidence gathered while selecting the candidate. |
--warnings | comma-separated strings | No | Reviewer warnings about ambiguity or setup risk. |
Common use: while bootstrapping evals, record a PR-derived coding task that should become a reviewed eval candidate.
143-tools eval add --pr_number 42 --pr_title "Fix checkout timeout" --base_commit_sha abc123 --solution_commit_sha def456 --solution_diff "$(git show --format= --patch def456)" --issue_description "Reproduce and fix the checkout timeout." --scoring_criteria '[{"name":"fixes-timeout","grader_type":"llm_judge","description":"The checkout path no longer times out."}]' --complexity moderate --fitness_score 0.9 --fitness_reasoning "Real regression with clear before/after behavior."143 code review history
Read access to past automated code reviews for the session's repository, mirroring the session-history namespace. These commands exist so agents can audit how the review policy behaved on real pull requests — which reviews approved, blocked, or escalated, and on what evidence — and then propose policy adjustments. Requires the review_feedback capability.
code-review-history list
List past code reviews for the current repository, newest first. Rows are compact summaries: PR context, decision, status, risk verdict, and the policy_id of the policy version that governed the review. The full review body is only returned by get.
| Flag | Type | Required | Description |
|---|---|---|---|
--decision | approved | comment_only | needs_human_review | blocked | No | Filter by review decision. |
--status | queued | running | completed | failed | stale | cancelled | No | Filter by review run status. |
--outcome | automatically_approved | completed_not_approved | No | Filter by posted outcome. |
--acceptable | boolean | No | true for reviews judged acceptable risk, false for reviews flagged for humans. |
--search | string | No | Match PR title, repo name, session title, or PR number. |
--created_after | string | No | Only reviews created after this RFC3339 timestamp. |
--created_before | string | No | Only reviews created before this RFC3339 timestamp. |
--cursor | string | No | Pagination cursor: the id of the last row from the previous page (also returned as meta.next_cursor). |
--limit | number | No | Max results. Defaults to 20, capped at 50. |
Common use: sample recent decisions before judging whether the policy is behaving as intended.
143-tools code-review-history list --decision blocked --created_after 2026-06-01T00:00:00Z --limit 20code-review-history get
Get one review in full: the posted review body, every finding (severity, confidence, file and line range, and whether it was posted as an inline comment), and each reviewer agent's structured verdict. Look up by the session_id field from a list row.
| Flag | Type | Required | Description |
|---|---|---|---|
--session_id | string | Yes | Code review session ID from code-review-history list. |
--include_raw_output | boolean | No | Include each reviewer agent's raw output, truncated. Defaults to false. |
--include_prompts | boolean | No | Include the rendered reviewer prompts, truncated. Defaults to false. |
Common use: inspect why a review reached its decision — compare the findings and verdicts against the diff before proposing a policy change.
143-tools code-review-history get --session_id 9b8c1c33-8ddc-4d75-8f68-f6a72f2b6c1dcode-review-history policy
Get the org's code review policy. Without flags it returns the active resolved policy (source is organization for a saved policy or default when the org has never saved one). Pass --policy_id (from a review's policy_id field) to fetch the exact historical version that governed a past review.
| Flag | Type | Required | Description |
|---|---|---|---|
--policy_id | string | No | Policy version UUID. Omit for the active policy. |
Common use: diff the policy version behind a run of bad decisions against the current version, then draft an improved review_instructions or automated_approval_policy for a human to apply in review settings.
143-tools code-review-history policy
143-tools code-review-history policy --policy_id 5c2f9a51-40cb-45f7-8f0d-6bc47d4e2a11code-review-history update_policy
Apply a versioned update to the org's code review policy. Supplied config keys merge onto the active policy — omitted fields keep their current values, and the merge is recursive for nested sections (only the keys you supply change; JSON arrays are the exception and replace the current array wholesale). The write closes the iteration loop: an agent that audited past reviews can adjust the policy itself instead of asking a human to tweak the knobs.
This is the only write in the namespace and it is separately permissioned. It requires the code_review_policy_management capability at write access, which is off by default (unlike review_feedback, it is not in the recommended default grants). Org admins can grant it in capability settings, or an agent can ask for one-run approval with 143-tools capability request --capability-id code_review_policy_management --access-level write --reason "...". The grant also carries the policy read so the agent can fetch the active version its update must reference, even if review_feedback is not granted.
Safeguards on every update:
--expected_versionmust match the active policy version (0if the org has never saved one). If the policy changed since it was read, the call fails with409 CODE_REVIEW_POLICY_VERSION_CONFLICTand the current version — re-read withpolicyand retry.--reasonis required and recorded in the org audit log along with the session that made the change.- Policies are insert-only versions; a human can review the audit trail and restore any earlier version from review settings.
| Flag | Type | Required | Description |
|---|---|---|---|
--config | string | Yes | JSON object of policy fields to change, same shape as the policy output's config (e.g. {"review_instructions":"..."}). |
--expected_version | number | Yes | Active policy version this change is based on. 0 when the org has never saved a policy. |
--reason | string | Yes | Why the policy is changing; stored in the audit log. Max 2000 characters. |
Common use: after list/get show a pattern of wrong decisions, apply the corrected instructions directly.
143-tools code-review-history update_policy \
--expected_version 7 \
--reason "Blocked three doc-only PRs this week; policy now exempts docs-only diffs" \
--config '{"automated_approval_policy":"Approve documentation-only changes that touch no executable code."}'