Skip to content

fix(pebble): surface timeout budget in system prompt#91

Merged
max-tet merged 1 commit into
mainfrom
fix/pebble-prompt-timeout-budget
Jun 5, 2026
Merged

fix(pebble): surface timeout budget in system prompt#91
max-tet merged 1 commit into
mainfrom
fix/pebble-prompt-timeout-budget

Conversation

@ClaydeCode
Copy link
Copy Markdown
Owner

Problem

The Pebble webhook enforces a hard wall-clock timeout (CLAYDE_PEBBLE_TIMEOUT, default 300s) on each Claude CLI invocation, but the system prompt never mentioned it. The agent had no way to know its budget, so it could take on a task too large to finish — and get killed mid-run, leaving the user with no result.

Change

  • skills.pybuild_system_prompt(skills, timeout_s=300) injects the budget into the prompt: the request has N seconds, the process is killed on overrun, prefer a smaller complete action over an ambitious one, and if the task is too big, do the most valuable part and say so in the JSON summary.
  • worker.py — passes the configured timeout_s (already in scope from CLAYDE_PEBBLE_TIMEOUT) into the prompt builder.
  • Tests — new test_prompt_mentions_timeout_budget; two monkeypatch stubs updated for the new signature.

Default timeout_s=300 (matches the config default) keeps existing call-site tests green; the worker always passes the live configured value.

Verification

uv run --extra dev pytest — 364 passed.

🤖 Generated with Claude Code

The Pebble webhook enforces a hard wall-clock timeout (CLAYDE_PEBBLE_TIMEOUT,
default 300s) but never told Claude about it, so the agent could take on work
too large to finish and get killed mid-task with no result for the user.

build_system_prompt now takes timeout_s and states the budget in the prompt:
process is killed on overrun, prefer a smaller complete action, and report the
most valuable partial result in the JSON summary if the task is too big.
worker.py passes the configured timeout through.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@max-tet max-tet merged commit ce2a923 into main Jun 5, 2026
3 checks passed
@max-tet max-tet deleted the fix/pebble-prompt-timeout-budget branch June 5, 2026 19:48
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.

2 participants