Skip to content

v1.3.301

Latest

Choose a tag to compare

@topcheer topcheer released this 01 Dec 14:32
· 6 commits to main since this release

ggcode v1.3.301

Highlights

  • code_execution can run shell commands. The sandbox rejected tools.run_command with "not a read-only tool - call it directly after this run", so a read -> command -> read sequence still cost one round trip per command. await tools.run_command({command, description, timeout?}) now executes the command and resolves to its output, so "git log, then build, then test" is one run. Two budget guards are stated in the tool description: the command timeout is clamped to 25 s (it shares the 30 s run budget), and at most 20 shell commands run per code_execution. Long-running work (dev servers, watchers, big builds) still goes through a direct start_command. run_command is deliberately kept out of the read-only set that gates define_tool / macro steps, whose replay must stay side-effect free.
  • A reasoning-only turn is no longer a silent finish. With reasoning models, a turn that streamed 1,124 chars of thinking and then stopped with an empty content array printed the tool output and "Finished" - no answer, no error - and the run ended. The empty-response guard required OutputTokens == 0, but thinking is billed as output tokens. "Empty" now means no text, no tool calls and no non-thinking content regardless of token count: the model gets a nudge that says what was wrong, the user sees a retry notice ([... - retrying (n/3)]), and the existing 3-consecutive-empty budget still aborts with the usual visible error.
  • Persisted refusals: cron prompts are not the user, and the ledger file is user-controlled. Three fixes in the refusal ledger (/refusals): (1) cron firings were the one non-keyboard entry point that did not skip the ledger, so a decision record inside an agent-authored cron prompt ("do not delete v1.3.299's submission") became an enforced cross-run refusal and blocked the daily Windows store-submission dispatch; cron now skips recording like lanchat / IM / webchat already did. (2) A negation excerpt no longer stops at a dot inside a token, and a dotted token is one anchor (v1.3.299, not v1.3), so a refusal about one version cannot block its neighbour. (3) .ggcode/refusals.json is explicitly user-controlled: any write-class tool call that targets it is blocked - even with no matching refusal and even with an empty ledger - where before an agent could write_file {"entries":[]} and lift every refusal. Reading it (cat, grep) stays allowed.
  • /refusals forget <n> removes one entry. Previously the only command was /refusals clear, so dropping one wrong entry meant throwing away every real one. forget (aliases remove / delete / rm) removes the 1-based entry shown by /refusals and persists it; the block message and the listing both point at it.
  • Microsoft Store publish defers instead of crashing when the previous submission is still in certification. A pending submission with an empty fileUploadUrl is already committed to Store certification; the script used to resume it anyway and crash at upload ("Cannot validate argument on parameter 'Uri'", v1.3.300 run 46333670014, because v1.3.299 was ~22 h into a normal weekend certification). It now prints "submission already committed to Store certification ... Windows publish for deferred - re-dispatch store-submission after it publishes" and exits 0. Deleting a committed submission - which skips a Store version irreversibly - only happens with the explicit -DeletePendingSubmission switch.

Fixes and improvements

  • cron: the #5594 past-date rejection evaluated an explicit day+month only in the current year, so every January one-shot written in December (0 0 1 1 *, a fire 31 days out) was rejected as "334 days ago" - on 2026-12-01 it broke main CI and the #5673 regression test. The same date in the next year is now checked too: within the 90-day horizon it is a legitimate upcoming fire; beyond it (and "earlier today") the rejection is unchanged and far: true still does not bypass it
  • tool: sandboxCallableNames() = readOnlyToolNames + run_command feeds the code_execution injection loop, tools.names() and tools.describe(); sandboxInputAdjust clamps the run_command timeout; a per-run shell-call budget surfaces its error inside try/catch
  • agent: empty-turn guard keys on content shape (text / tool calls / non-thinking blocks), not OutputTokens; truncation continuation and policy-blocked empty turns unchanged; debug line carries output_tokens / reasoning_chars / reasoning_only
  • tui: cron firings set the refusal-ledger inhibit on the immediate path and enqueue as hidden+remote (pendingQueue.enqueueHiddenRemote) when busy; /refusals forget <n> with usage / out-of-range / no-session paths; completion text updated
  • agent (refusal ledger): refusalNegatePattern keeps dots inside tokens; refusalPathPattern takes a dotted token as a whole; quoted-discussion directives still end at the closing quote (#4398 dedup intact); targetsRefusalLedger guards the ledger file for file tools and non-read-only shell commands
  • release: store-submission treats an empty fileUploadUrl as "committed, defer" (exit 0) and keeps resume only for true drafts; runbook documents the deferral and the re-dispatch procedure
  • docs: docs/guide/tool-macros.md notes the sandbox-only run_command exception; docs/guide/refusal-ledger.md gains the entry-point rule, the user-controlled section and the forget usage; docs/design/agent-loop.md gains the empty-turn guard row; docs/guide/configuration.md documents the past-date / next-year rule for one-shot schedules
  • release prep: make sync-model-caps was run and its diff was rejected, as for v1.3.293-v1.3.300 - upstream still lists glm-5.4 with a 1,000,000 context window (the built-in row pins 1,048,576) and still drops the W47 calibration row claude-opus-4.7; the capability table ships unchanged

Upgrade notes

  • No config changes. Nothing to migrate; the capability table ships unchanged.
  • code_execution runs can now execute shell commands on their own (timeout clamped to 25 s, at most 20 per run). If you relied on the sandbox being strictly read-only, the run_command calls are visible in the [tool calls made by code: ...] footer of every run.
  • A refusal recorded before this release from cron-prompt text is still in your .ggcode/refusals.json. List with /refusals; remove a wrong one with /refusals forget <n> or wipe all with /refusals clear. The ledger file can no longer be edited by the agent - only by you.
  • A store-submission run that ends with "deferred" is the expected shape while the previous Store submission is still certifying; re-dispatch store-submission from main once it publishes.

Compare

v1.3.300...v1.3.301