Skip to content

Leave out campaigns that can't be paused or resumed before the confirm - #30

Open
amitl-levi wants to merge 5 commits into
mainfrom
fix/pause-unpausable-campaigns
Open

amitl-levi wants to merge 5 commits into
mainfrom
fix/pause-unpausable-campaigns

Conversation

@amitl-levi

@amitl-levi amitl-levi commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

What

Before previewing a campaign pause or resume, manage-campaigns checks the campaign's status. A campaign that can't be paused or resumed is left out and named, so the user never confirms a change that is going to fail.

Why

Realize refuses to pause or resume a campaign whose own status is Rejected or Terminated. The MCP already says so on update_campaign's is_active field, and its error says not to retry. But the plugin's preview-then-confirm step runs before the MCP is called, so those campaigns still appeared in the preview and the user confirmed a change that then failed.

How

  • The plugin does not list the blocked statuses. The skill points at the MCP's is_active description, so the MCP stays the one source of truth.
  • One rule, in the existing pause step (Updating a campaign → Scalars only, step 2), plus short pointers from the scope-confirmation line and the delete → pause fallback.
  • Only the campaign's own status blocks a pause, so a campaign whose group was terminated is not skipped. The status shown can hide the real reason, so if a pause still fails as "cannot be paused or resumed", the skill says not to retry.
  • If the campaign is already in the requested state, nothing is sent.
  • The post-write check now reads is_active, not status: a campaign in a terminated group keeps the group's status after a successful pause.

Also

  • Test scenario W22 in tests/test-scenarios-write.md.
  • Version stays 0.5.5 — the release number is frozen until the directory review closes, so this entry folds under the existing ## [0.5.5] heading rather than opening a new one.
  • The Codex package doesn't ship manage-campaigns; there the MCP's own field description and error are the guard.

🤖 Generated with Claude Code

Realize refuses to pause or resume a campaign whose own status is
Rejected or Terminated, and the MCP's is_active description says so.
manage-campaigns now checks status before previewing a pause or resume,
names the campaigns it leaves out, and defers to the MCP description for
the status list. A pause that still fails this way is not retried, and
the post-write check reads is_active instead of status. Adds write
scenario W16 and bumps the version to 0.5.6.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
amitl-levi and others added 2 commits November 7, 2026 21:42
…campaigns

# Conflicts:
#	.claude-plugin/plugin.json
#	.codex-plugin/plugin.json
#	skills/manage-campaigns/SKILL.md
#	tests/test-scenarios-write.md
Review confirmed the approach: the MCP does not block a pause itself, it
passes the backend's error through, so checking before the user confirms is
the only way to catch it early. Verifying the write on is_active rather than
status is right for the same reason.

Two corrections came out of checking the platform source.

The refusal is on the campaign's own internal state, not on the status the
read returns. Those are different things: status is resolved in a fixed
order in which the account and the group outrank the campaign, so a campaign
that genuinely cannot be paused can report something else entirely, and a
campaign reporting its group's termination may still be pausable. The skill
now treats status as a filter rather than a verdict, catching the clear
cases and leaving the write as the backstop for the rest.

Deleting a campaign group terminates the campaigns in it. So a campaign
reported under a terminated group has often been terminated in its own
right, and the pause will be refused. It is still not skipped, because the
reported status cannot tell the two apart, but the preview now names the
group as terminated and says the pause may come back refused. Dropping it
and previewing it as routine are both wrong.

Merged main: resolved the version and Codex plugin name, folded the
pause/resume step into "Scalars only" alongside the campaign-group steps
that landed in the meantime, and renumbered the new scenario to W22.

Version 0.5.7, after 0.5.6.

Checked against the Realize platform and MCP sources at their default
branches on 2026-11-07.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@amitl-levi

Copy link
Copy Markdown
Collaborator Author

Pushed, and merged main in — the conflict was the version, the Codex plugin name, the "Scalars only" step list (your campaign-group steps landed in the same place) and a scenario number collision, so the new scenario is now W22.

Thanks for the three points — all confirmed, and checking the platform source behind them turned up two corrections.

The refusal is on the campaign's own internal state, not on the status the read returns. Those are different things. status resolves in a fixed order where the account and the group outrank the campaign, so a campaign that genuinely cannot be paused can report something else entirely — its group's termination, a frozen account, billing review, an ad-server setup error — and a campaign reporting its group's termination may still be pausable. The skill now treats status as a filter rather than a verdict: it catches the clear cases, and the write is the backstop for the rest. Which is your first point exactly.

Deleting a campaign group terminates the campaigns in it. So a campaign reported under a terminated group has often been terminated in its own right and the pause will be refused. It is still not skipped — the reported status cannot tell the two cases apart — but the preview now names the group as terminated and says the pause may come back refused. Dropping it and previewing it as routine are both wrong, and the first draft did the second. W22 now fails a preview that leaves the warning out.

Your other two points needed no change: post-write verification already reads is_active, and sending is_active equal to its current value is a no-op rather than an error, so the skill sending nothing in that case is fine.

Version 0.5.7. It sits behind #32 at 0.5.6, so that one needs to merge first. #34 follows at 0.5.8.

Two review rounds plus a source-verification pass against the platform and MCP sources at their default branches, 2026-11-07.

@amitl-levi
amitl-levi requested a review from yanush88 November 7, 2026 22:03
amitl-levi and others added 2 commits November 26, 2026 13:26
The version stays 0.5.5 until the directory review closes, so this entry folds
under the existing 0.5.5 heading instead of opening a new one, and all four
version files go back to 0.5.5.

Also corrects a stale line: a campaign reporting its group's termination "may
still be pausable", matching the skill's own wording.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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