Skip to content

feat: bump max-turns default to 100 and stream full Claude output#7

Merged
mtrunkat merged 1 commit into
mainfrom
claude/mongodb-query-index-check-verbose
May 17, 2026
Merged

feat: bump max-turns default to 100 and stream full Claude output#7
mtrunkat merged 1 commit into
mainfrom
claude/mongodb-query-index-check-verbose

Conversation

@mtrunkat
Copy link
Copy Markdown
Member

Why

Real runs against apify-core hit the 30-turn cap and produced permission_denials_count: 6 with no visibility into which 6 tools got blocked, because anthropics/claude-code-action's default output truncation hid the conversation trace.

What changes

1. Default max-turns: '30''100'

The previous 30-turn budget was workable for trivial PRs but too tight for anything substantial — Claude burns ~1 turn per changed file before it even starts reading indexes or posting comments. A 22-file PR has no chance.

Important: Claude only spends what it needs, so callers with small PRs pay nothing extra; large PRs now have headroom. Workflows that previously passed max-turns: '100' (apify-core's recent bump) can drop the input and inherit the new default.

2. show_full_output: true on the Claude step

Dumps the full conversation trace — every tool call, response, and permission denial — to the workflow log. The next time we see permission_denials_count: 6, we'll be able to read off exactly which tools Claude tried that weren't in the allowlist.

Free in terms of cost (no extra API spend), small in terms of log size, big in terms of debuggability.

What I'm NOT changing

  • The --allowedTools list — it was just expanded in #6 (added Grep, Glob, TodoWrite, Task, Bash(jq:*)). The next pass on the allowlist should be driven by what show_full_output: true reveals.
  • The prompt — same reason.
  • The max-turns input itself — still configurable, just with a saner default.

Test plan

  • python3 -c "import yaml; yaml.safe_load(...)"action.yaml valid
  • pnpm run lint — clean
  • pnpm run type-check — clean
  • pnpm run test — 35/35
  • Real run: re-trigger the apify-core check against PR #27953 (or whatever big-PR target). Expected: either the run completes inside 100 turns (success), or it fails again — but now we'll see exactly which tools Claude wanted that we didn't grant.

Generated by Claude Code

Two debug/headroom changes prompted by real runs on apify-core hitting
the turn cap and going silent on what was happening:

* Bump default `max-turns` from 30 → 100. The previous default was too
  tight even for medium PRs (a 22-file apify-core PR ran out at 30
  turns). Claude only spends what it needs, so callers with small PRs
  pay nothing extra; large PRs now have headroom. Callers can still
  override per workflow.
* Set `show_full_output: true` on `anthropics/claude-code-action`. The
  workflow log now contains the full conversation trace — every tool
  call, response, and permission denial. This is what we need to debug
  cases like the recent `permission_denials_count: 6` failure where
  the truncated default output didn't tell us which 6 tools got blocked.

README's input table updated.
Copilot AI review requested due to automatic review settings May 17, 2026 13:12
@mtrunkat mtrunkat merged commit 812c5cb into main May 17, 2026
4 checks passed
@mtrunkat mtrunkat deleted the claude/mongodb-query-index-check-verbose branch May 17, 2026 13:12
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the mongodb-query-index-check action defaults to give Claude more review headroom and improve debugging visibility through full Claude output logs.

Changes:

  • Increases the default max-turns from 30 to 100.
  • Enables show_full_output for the Claude Code action step.
  • Updates README input documentation for the new max-turns default.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
mongodb-query-index-check/README.md Documents the new max-turns default.
mongodb-query-index-check/action.yaml Applies the new default and enables full Claude output logging.
Comments suppressed due to low confidence (1)

mongodb-query-index-check/action.yaml:163

  • Enabling full Claude output by default will write every tool call and response to the workflow logs, including PR source snippets, diffs, and mongo-index definition contents that the prompt instructs Claude to read. For consumers running this action on private code, that materially broadens exposure of proprietary source to anyone with Actions log access; consider making this opt-in or documenting a safer debug-only input instead of enabling it unconditionally.
        show_full_output: true

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

| `github-token` | no | `${{ github.token }}` | Token used to post review comments. |
| `apify-core-token` | no | _(empty)_ | When set, fetches `mongo-indexes` from `apify/apify-core@develop`. When empty, the action assumes it is running on `apify-core` and reads `src/packages/mongo-indexes/src` from the workspace. |
| `max-turns` | no | `30` | Maximum turns Claude may take. |
| `max-turns` | no | `100` | Maximum turns Claude may take. The default headroom fits large multi-file PRs; Claude only spends what it needs. |
Comment on lines +24 to +26
description: 'Maximum turns Claude may take. Default 100.'
required: false
default: '30'
default: '100'
fnesveda pushed a commit that referenced this pull request May 18, 2026
🤖 I have created a release *beep* *boop*
---


## [1.1.0](v1.0.0...v1.1.0)
(2026-05-18)


### Features

* add mongodb-query-index-check action
([#3](#3))
([e288951](e288951))
* add python-package-check composite action
([#11](#11))
([cafe9c0](cafe9c0))
* bump max-turns default to 100 and stream full Claude output
([#7](#7))
([812c5cb](812c5cb))
* expand allowed-tools list for mongodb-query-index-check
([#6](#6))
([42e0fe2](42e0fe2))
* make the review prompt directive instead of descriptive
([#8](#8))
([910af2a](910af2a))
* mention [@mtrunkat](https://github.com/mtrunkat) in the review summary
on findings ([#12](#12))
([2f0becd](2f0becd))


### Bug Fixes

* move state files into workspace and address bash sandbox denials
([#9](#9))
([6e2aa05](6e2aa05))
* Stop using `@octokit/rest` in scripts
([#10](#10))
([232b613](232b613))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.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.

4 participants