ci(spec-sync): raise AI turn cap + exploration tools - #103
Merged
Conversation
The inaugural dispatch hit error_max_turns at 40 turns (incomplete wiring, 2 permission denials) because the agent could not explore the codebase (only Bash(rye *)/Bash(./scripts/*) were allowed, no Glob/Grep/read-only shell). - --max-turns 40 -> 250 (wiring a full resource like parse_jobs is large) - allowedTools += Glob, Grep, Bash(git diff:*) so the agent explores natively; still no git write/push capability (prompt-injection hardening intact) - prompt now tells it to read the diff + parse_jobs.py first and run lint/format Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the spec-sync GitHub Actions workflow so the AI wiring phase has a larger turn budget and can explore the repository (glob/grep and git diff) to complete spec-driven SDK updates more reliably.
Changes:
- Increased Claude Code
--max-turnsfrom 40 to 250 for the AI wiring step. - Expanded
--allowedToolsto includeGlob,Grep, andBash(git diff:*). - Refined the AI prompt to explicitly inspect the prior commit’s diff and mirror
parse_jobs.pyconventions, then run formatting and linting.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…t to 60m Addresses Copilot review on #103: - prompt: clarify 'git diff' (read-only) is allowed while stage/commit/push/other git is not (previously 'inspect git diff' + 'do NOT run git' read as contradictory) - timeout-minutes 30 -> 60 so a long --max-turns 250 AI run isn't killed by the job timeout Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Comment on lines
+128
to
+129
| --max-turns 250 | ||
| --allowedTools "Edit,Write,Read,Glob,Grep,Bash(rye *),Bash(./scripts/*),Bash(git diff:*)" |
tian-lan-landing
added a commit
that referenced
this pull request
Aug 3, 2026
…#139) claude-sonnet-5 runs adaptive thinking when `thinking` is unset. The thinking tokens count against max_tokens and the first content block is a thinking block, so `.content[0].text` came back empty and the "What changed" section was silently dropped. Same failure as the TypeScript side (PR #102, #103); this one just hadn't tripped yet. Turn thinking off, join all text blocks instead of indexing [0], bump the cap 700 -> 1000, and log the response shape on empty. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The inaugural spec-sync dispatch (run 28914895509) failed at
error_max_turns— the AI wiring step ran the full 40 turns without finishing and with 2 permission denials, because it had no way to explore the codebase (onlyBash(rye *)/Bash(./scripts/*)were allowed).--max-turns40 → 250 (wiring a full resource mirroringparse_jobsis large)allowedTools+=Glob,Grep,Bash(git diff:*)— native exploration; still no git write/push (injection hardening intact)parse_jobs.pyfirst, then run lint/formatAfter merge: close #102 and re-dispatch
spec-sync.ymlfor the inaugural extract/jobs run.🤖 Generated with Claude Code