Repository navigation
Conversation
…g effort
Reasoning effort was hardcoded at every gstack-owned outside-voice launch, so
the only way to run review or consult at a different effort was to edit the
repo and refight it on the next upgrade.
GSTACK_CODEX_EFFORT now supplies model_reasoning_effort for Codex launches and
GSTACK_CLAUDE_EFFORT adds --effort to the Claude runner. Every default is
unchanged: high for review/challenge/adversarial, medium for consult and the
spec gate, and no --effort flag at all for Claude unless the variable is set,
so the CLI's own configuration is never overridden by an unrequested flag.
The flag is built the way CODEX_MODEL_CONFIG_FLAG is, so real ${...} expansion
survives into the rendered skill, and each template supplies its own per-mode
default through a resolver argument. The variable replaces that default rather
than deferring to it; an effort named in the request is substituted by the
skill itself and stays outside the expansion.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
Contributor
|
Thank you for this, @lubosxyz. It's a reasonable idea, but not one we can take right now: Fold an effort knob into the model-tier configuration from #3073 instead of adding a parallel pair of env vars. We're parking it: closing the PR and recording the idea in TODOS.md under its theme, so it isn't lost. When we pick that theme up we'll reference this PR and credit you. |
capy-ai Bot
pushed a commit
that referenced
this pull request
Oct 11, 2026
…send binaries, codex_effort setting, privacy disclosures (Wave 9 Lane C) (#3144) Outside-review consent (codex_reviews) is enforced in gstack-codex-probe run-with-timeout, gstack-claude-code, gstack-outside-voice run and the autoplan runner (not_run / consent_missing, exit 3; #3102). Codex reasoning effort resolves GSTACK_CODEX_EFFORT, then codex_effort, then each gate's default inside run-with-timeout --effort (D1-A; #3098, closes #2934). README and telemetry privacy disclosures corrected (#1081, #1080, #1150). Co-authored-by: Lockyer <[email protected]> Co-authored-by: Lubos Buracinsky <[email protected]>
Contributor
Closed
4 of 5 tasks
levi85
pushed a commit
to levi85/gstack
that referenced
this pull request
Oct 14, 2026
…send binaries, codex_effort setting, privacy disclosures (Wave 9 Lane C) (garrytan#3144) Outside-review consent (codex_reviews) is enforced in gstack-codex-probe run-with-timeout, gstack-claude-code, gstack-outside-voice run and the autoplan runner (not_run / consent_missing, exit 3; garrytan#3102). Codex reasoning effort resolves GSTACK_CODEX_EFFORT, then codex_effort, then each gate's default inside run-with-timeout --effort (D1-A; garrytan#3098, closes garrytan#2934). README and telemetry privacy disclosures corrected (garrytan#1081, garrytan#1080, garrytan#1150). Co-authored-by: Lockyer <[email protected]> Co-authored-by: Lubos Buracinsky <[email protected]>
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.
Why (in your own words)
You can already pin the model an outside voice runs on —
GSTACK_CODEX_MODEL,GSTACK_CLAUDE_MODEL— but not how hard it thinks. Reasoning effort is written into the source in a dozen places:
scripts/resolvers/outside-voice.tshardcodesmodel_reasoning_effort="high"for both thestructured-review and the
codex execform, the codex section templates hardcode"high"(review, challenge) and
"medium"(consult), and the Claude runner inlib/claude-code.tsdoesnot pass an effort at all.
That is fine until you are paying for it. Running
/reviewand/ship's adversarial pass athighon every iteration of a tight loop is real money and real latency, and the only way to turnit down today is to edit the repo — which then fights every upgrade. The reverse case is just as
real: someone on a hard problem wants the consult pass at
highfor an afternoon and has no way tosay so.
This adds the missing sibling of the model override, and nothing else:
GSTACK_CODEX_EFFORTsuppliesmodel_reasoning_effortfor gstack-owned Codex launches.GSTACK_CLAUDE_EFFORTadds--effortto the Claude runner.No default changes. With neither variable set, every launch runs at exactly the effort it runs
at on
maintoday:highfor review/challenge/adversarial and the plan/design/docs reviews,mediumfor consult and the spec gate, and the Claude runner still passes no--effortflag atall. That last one matters — passing an unrequested
--effortwould override the user's own CLIconfiguration, so the flag is only added when the variable is actually set. I have deliberately not
brought my own policy preference upstream; that stays in my own config, which is the whole point of
making it an env var.
The mechanism copies
CODEX_MODEL_CONFIG_FLAGexactly, including the double-quoted form so real${...}shell expansion survives into the rendered skill: each call site renders${GSTACK_CODEX_EFFORT:-<that call's default>}.Precedence, stated precisely, because it is not uniform and a reviewer should not have to work it
out. The variable replaces the per-mode default rather than deferring to it — with
GSTACK_CODEX_EFFORT=low, the review pass runs atlow, nothigh. That is the intent: one knobthat means "turn everything down for this shell". What it does not touch is the
--xhighpathdocumented in
codex/SKILL.md, because that one instructs the skill to substitute the effortitself, so it sits outside the expansion entirely. So: request-named effort, then
GSTACK_CODEX_EFFORT, then the per-mode default. (My first draft of the README claimed an explicitper-call effort beat the variable; it does not, and the docs in this PR say what the code does.)
One design note worth flagging for review: the new resolver takes the per-mode default as a
template argument (
{{CODEX_REASONING_EFFORT_FLAG:medium}}in consult-mode), so each template keepsits own default in its own file rather than the resolver having to know which caller it is rendering
for. That is why consult stays
mediumand review stayshighwith one shared resolver.Live evidence
The generated output, before and after. This is the whole change as a user sees it —
codex/sections/review-mode.mdkeepshigh,codex/sections/consult-mode.mdkeepsmedium, andboth become overridable:
Behaviour of the override in a real shell (the rendered line, expanded by bash, is what the
skill actually runs):
New test —
test/codex-effort-env-override.test.ts, 5 tests. It pins the helper's default andargument form, that
outsideVoiceCommandrenders the env form withhighpreserved and contains nohardcoded
model_reasoning_effort="high"literal, that the spec gate keepsmedium, thatclaudeCodeArgsadds no--efforton an empty env and--effort highwhenGSTACK_CLAUDE_EFFORT=high, and that the rendered consult section keepsmediumwhile review keepshigh:The test discriminates. I reverted
lib/claude-code.tsandscripts/resolvers/outside-voice.tsby hand and re-ran it:
The value stays in its own argument. Worth showing rather than asserting, since this is an env
var landing in a rendered command line. I reproduced the generated line verbatim in a script and
printed the child's argv for hostile values:
argcis 3 in every case: the expansion happens inside a double-quoted string that is part of thescript text, so the value is never word-split, never re-parsed for quotes, and no command
substitution runs. A value containing a quote stays inside that one argument and Codex rejects it as
a malformed config value rather than treating it as a flag. This is the same containment
${GSTACK_CODEX_MODEL:-...}already relies on; the new variable adds no new exposure.Generator freshness (this is what
skill-docs.ymlchecks — regenerating changes nothing, so thecommitted
SKILL.mdfiles match their templates):Free suite:
Scope
scripts/resolvers/constants.ts(CODEX_DEFAULT_EFFORT='high',codexReasoningEffortFlag(default),CODEX_REASONING_EFFORT_FLAG),scripts/resolvers/utility.ts(the resolver, honouring a template argument as the default),scripts/resolvers/index.ts(registration only — I did not touchOUTSIDE_INVOCATION's effortvalues),
scripts/resolvers/outside-voice.ts(both launch forms,?? 'high'preserved),lib/claude-code.ts(conditional--effort), and the three codex section templates.scripts/resolvers/design.tsis untouched, so design-consultation keepsmediumanddesign-review keeps
high.SKILL.md/ section outputs that render those launches, viabun run gen:skill-docs --host all. I edited templates and regenerated; no generated file washand-edited.
test/codex-effort-env-override.test.ts;test/skill-validation.test.ts's tworeasoning_effort="high"assertions updated to the newrendered string (still asserting the
highdefault, not weakened);test/provider-model-defaults.test.ts'sENV_KEYSextended so the two new variables aresaved/cleared/restored around tests;
README.md,CONTRIBUTING.mdanddocs/skills.mddocumentthe override next to
GSTACK_CODEX_MODEL.VERSION→ 1.87.6.0 and aCHANGELOG.mdentry.bun run test, andbun run gen:skill-docs --host all+git diff --exit-codefor the generator gate./reviewrun at a non-default effort (the change is in therendered command line, which the tests assert directly); Windows; whether any given Codex model
accepts a particular effort value — gstack passes the string through, and an invalid value fails
in Codex the same way an invalid
GSTACK_CODEX_MODELdoes today.Liveness proof (required for external contributors)
I have not attached a
GSTACK PRscreenshot, and I would rather explain than quietly tick the box.This change was prepared with agent assistance on my own machine and under my own account, so an
image produced from that session would be me manufacturing the human-presence attestation the gate
exists to check. GitHub also offers no API for attaching an image to a PR body — only drag-drop in
the web UI — so that session could not have produced one honestly anyway.
What I can give you is the provenance the template asks agents for:
If you want the screenshot before reviewing, say so and I will add it myself in the web UI.
Checklist
GSTACK PRtyped live into a real surface) or PR author is @garrytan (owner exemption) — not attached; see the section above,gh api user --jq .login→lubosxyz, happy to add on requesttest/codex-effort-env-override.test.ts, which fails if either call site is reverted