Skip to main content

agent-degraded-output-suspect-execution-environment

When a capable agent first declares a STRONG plan/contract/approach then a retry or continuation produces a WEAKER one, suspect the execution environment couldn't run the strong version โ€” not model laziness or a prompting gap.

Jump to install

Source facts

Repository
blas1n/claude-skills
Last source activity
August 18, 2026 at 04:37
Detected SKILL.md language
Mixed languages
Stars
2
Forks
0

Install options

The review-first prompt is selected by default. You can switch to a direct command or download a local copy.

Review the source files

Read SKILL.md and any companion files shown by SkillsMP before deciding whether to install.

Showing SKILL.md

SKILL.md
Source instructions ยท Read-only preview
name
agent-degraded-output-suspect-execution-environment
description
When a capable agent first declares a STRONG plan/contract/approach then a retry or continuation produces a WEAKER one, suspect the execution environment couldn't run the strong version โ€” not model laziness or a prompting gap.
# Agent declares strong, then degrades โ†’ suspect the execution environment ## Problem An LLM agent with a declareโ†’execute split (declares a verification contract / a plan / a tool sequence, then carries it out) produces a **weak** final artifact. The obvious first hypothesis โ€” "the model is lazy / the prompt is too soft / it doesn't follow instructions" โ€” is often **wrong**. - ์ฆ์ƒ: the agent declares something strong (`pytest`, a real test command, a thorough plan), the run fails or hits a round cap, and a retry / continuation re-declares a **weaker** version (`py_compile`, an `import`-only check, a trivial plan) that *does* pass. - ๊ทผ๋ณธ ์›์ธ: the strong version was **un-runnable in the agent's execution environment** โ€” a missing toolchain, a read-only path, a permission wall, a placeholder that didn't resolve. The agent ran the strong command, saw it fail, and *rationally* degraded to something the broken environment could satisfy. - ํ”ํ•œ ์˜คํ•ด: blaming prompt strength โ†’ you strengthen the prompt, the agent declares strong AGAIN, it still can't run it, and it degrades AGAIN. Prompt engineering cannot fix an environmental wall. Real case (BSNexus, 2026-05): the work LLM's `shell_exec` ran in a backend container with no `pytest`/`ruff`. qwen3 declared a strong `pytest` contract (A1 prompt work succeeded), spent 36 rounds unable to run it (`pip install` blocked โ€” read-only site-packages), hit the loop cap; the Tier-1 continuation then re-declared an `import`-only contract that matched the broken environment. The deliverable reached `verified` with its tests never run. The fix was environmental (give the work phase the toolchain โ€” a sandbox), not prompting. ## Solution When you see declare-strong-then-degrade, **diagnose the environment before touching the prompt**: 1. Take the STRONG thing the agent declared on the first attempt and run it *yourself*, by hand, in the exact environment the agent runs in (same container, same user, same cwd, same PATH). 2. If it fails โ€” missing binary (exit 127), `Permission denied`, read-only FS, an unresolved `<placeholder>` token โ€” that is the root cause. The agent isn't lazy; it's adapting to a broken env. 3. Fix the environment (install the toolchain, fix ownership, resolve the placeholder, mount the volume) โ€” not the prompt. 4. Re-verify: the agent should now declare strong AND the strong version should run. Inspect the agent's tool-call trace (e.g. `tool_events`): a run that shows the agent *trying* the strong command, getting errors, then `pip install` attempts, then falling back โ€” is the signature. ## Key Insights - A capable agent degrading its own output is usually **rational adaptation to a broken environment**, not a compliance failure. The agent saw the strong path fail and routed around it. - The declareโ†’execute split makes this sneaky: the *declaration* looks fine (prompt worked), so you don't suspect the prompt is innocent. The break is between declare and execute. - Prompt engineering has a hard ceiling here โ€” re-nudging a model to declare strong does nothing when the environment can't run strong. Same family as `local-llm-runtime-nudge-ceiling`. - First diagnostic move: **run the agent's own first-attempt strong command by hand in its environment.** One command tells you env-vs- prompt. ## Red Flags - A retry / continuation / fallback attempt produces a *simpler* or *weaker* artifact than the first attempt. - The agent's trace shows it tried tool/command X, got an error, then switched to a weaker Y. - `pip install` / `npm install` / `apt` attempts mid-run (the agent is trying to repair a missing toolchain itself). - "The model just won't do X" after you've already strengthened the prompt once. - A verification / gate passes via a check that doesn't actually exercise the deliverable (compile-only, import-only, `--help`). --- ## ์‚ฌ์ดŒ ์ฆ์ƒ โ€” "๊ฒŒ์œผ๋ฅธ ์—์ด์ „ํŠธ"๊ฐ€ ์‚ฌ์‹ค์€ **์•ˆ ๋ˆ ํ•˜๋ฅ˜ ๋‹จ๊ณ„**์ผ ๋•Œ ์•ž์˜ ๋‚ด์šฉ์€ *ํ•œ ๋Ÿฐ ์•ˆ์—์„œ* strongโ†’weak ๋กœ ๋–จ์–ด์ง€๋Š” ๊ฒฝ์šฐ๋‹ค. ๋‹ค๋‹จ๊ณ„ ํŒŒ์ดํ”„๋ผ์ธ (designโ†’impl, planโ†’build, extractโ†’transform)์—๋Š” **๊ฐ™์€ ์˜ค์ง„์˜ ๋‹ค๋ฅธ ๋ชจ์–‘**์ด ์žˆ๋‹ค: - **์ฆ์ƒ**: ์ฝ”๋“œ๋ฅผ ์š”์ฒญํ–ˆ๋Š”๋ฐ **๋ช…์„ธ ๋ฌธ์„œ ํ•˜๋‚˜**๊ฐ€ ๋‚˜์˜ค๊ณ  ๋Ÿฐ์€ `verified` / ์™„๋ฃŒ๋กœ ๋๋‚œ๋‹ค. "์—์ด์ „ํŠธ๊ฐ€ ์ผ์„ ํšŒํ”ผํ–ˆ๋‹ค / ์ง€์‹œ๋ฅผ ์•ˆ ๋”ฐ๋ž๋‹ค" ๋กœ ์ฝํžŒ๋‹ค. - **์‹ค์ œ**: ์ƒ๋ฅ˜ ๋‹จ๊ณ„(design)๋Š” **์ œ ์ผ์„ ์ •ํ™•ํžˆ ํ–ˆ๋‹ค.** ๋ช…์„ธ๋ฅผ ์“ฐ๋Š” ๊ฒŒ ๊ทธ ๋‹จ๊ณ„์˜ ์‚ฐ์ถœ๋ฌผ์ด๋‹ค. ๊นจ์ง„ ๊ฒƒ์€ **ํ•˜๋ฅ˜ ๋‹จ๊ณ„(impl)๊ฐ€ ์•„์˜ˆ ์Šคํฐ๋˜์ง€ ์•Š์€ ๊ฒƒ**์ด๋‹ค. ### ์™œ ์˜ค์ง„ํ•˜๊ธฐ ์‰ฌ์šด๊ฐ€ ํŒŒ์ดํ”„๋ผ์ธ์ด ์‚ด์•„ ์žˆ์„ ๋•Œ์™€ ์ฃฝ์—ˆ์„ ๋•Œ์˜ **์ƒ๋ฅ˜ ์‚ฐ์ถœ๋ฌผ์ด ์™„์ „ํžˆ ๋™์ผ**ํ•˜๋‹ค. ์ฐจ์ด๋Š” "๊ทธ ๋‹ค์Œ์— ๋ฌด์—‡์ด ์ƒ๊ฒผ๋‚˜" ๋ฟ์ธ๋ฐ, ์‚ฌ๋žŒ์€ ๋ˆˆ์•ž์˜ ์‚ฐ์ถœ๋ฌผ๋งŒ ๋ณธ๋‹ค. ๊ฒŒ๋‹ค๊ฐ€ ์ƒ๋ฅ˜ ๋Ÿฐ์€ ์ •์ƒ ์ข…๋ฃŒ๋ผ **์—๋Ÿฌ๋„ ๋กœ๊ทธ๋„ ์—†๋‹ค.** ### ๋จผ์ € ํ™•์ธํ•  ๊ฒƒ (์—์ด์ „ํŠธ๋ฅผ ์˜์‹ฌํ•˜๊ธฐ ์ „์—) ```sql -- 1) ์ด ๋Ÿฐ์€ ๋‹ค๋‹จ๊ณ„๋กœ ๋ถ„๋ฅ˜๋๋‚˜? select payload->'frame'->>'pipeline', payload->>'stage' from execution_runs where id = '<run>'; -- 2) ํ•˜๋ฅ˜ ๋Ÿฐ์ด ์‹ค์ œ๋กœ ์ƒ๊ฒผ๋‚˜? select count(*) from execution_runs where payload->>'design_run_id' = '<run>'; -- 3) ๊ฐ™์€ ์ถ•์œผ๋กœ ์‹œ๊ณ„์—ด โ€” ์–ธ์ œ๋ถ€ํ„ฐ ์•ˆ ์ƒ๊ฒผ๋‚˜? select created_at::date, count(*) from execution_runs where payload ? 'design_run_id' group by 1 order by 1; ``` 3๋ฒˆ์ด ๊ฒฐ์ •์ ์ด๋‹ค. **์–ด์ œ๊นŒ์ง€ ๋˜๋˜ ๊ฒŒ ์˜ค๋Š˜ 0์ด๋ฉด ์—์ด์ „ํŠธ ๋ฌธ์ œ๊ฐ€ ์•„๋‹ˆ๋‹ค.** ### ์‹ค์ œ ์‚ฌ๋ก€ (BSVibe, 2026-08-18) `worker_runtime.py` ๋ฆฌํŒฉํ„ฐ๋ง์„ ์š”์ฒญํ–ˆ๊ณ  (*"์ˆœ์ˆ˜ ๋ฆฌํŒฉํ„ฐ๋ง, ๋™์ž‘ ๋ณ€๊ฒฝ ๊ธˆ์ง€, ๊ธฐ์กด ํ…Œ์ŠคํŠธ ์ „๋ถ€ ํ†ต๊ณผ๊ฐ€ ์ˆ˜๋ฝ ์กฐ๊ฑด"*) `spec_..._split.md` ํ•˜๋‚˜๊ฐ€ ๋‚˜์™”๋‹ค. ์ฒ˜์Œ์—” **์—์ด์ „ํŠธ์˜ ํšŒํ”ผ**๋กœ ์ง„๋‹จํ•˜๊ณ  "์‚ฐ๋ฌธ ์‚ฐ์ถœ๋ฌผ" ๊ฒ€์‚ฌ๋ฅผ ์กฐ์ด๋Š” ์ˆ˜์ •์— ์ฐฉ์ˆ˜ํ–ˆ๋‹ค โ€” **ํ‹€๋ ธ๋‹ค.** ์‹œ๊ณ„์—ด์„ ์„ธ๋‹ˆ ์ฒด์ด๋‹๋œ impl ๋Ÿฐ์ด **์ „๋‚  1๊ฑด โ†’ ๋‹น์ผ 0๊ฑด**. ์ „๋‚  ์‚ญ์ œ๋œ ๋ผ์šฐํŒ… ๋ฃฐ์ด ์ฒด์ด๋‹ ๊ฒŒ์ดํŠธ์˜ ์•”๋ฌต์  ํ”ผ์ฒ˜ ํ”Œ๋ž˜๊ทธ์˜€๋‹ค. โ†’ `deleting-inert-config-row-disables-hidden-feature` **์ฐฉ์ˆ˜ํ–ˆ๋˜ "ํšŒํ”ผ ๋ฐฉ์ง€" ์ˆ˜์ •์€ ํ๊ธฐํ–ˆ๋‹ค.** ๊ทธ ์ˆ˜์ •์„ ๋„ฃ์—ˆ์œผ๋ฉด ์ •์ƒ์ ์ธ design ๋‹จ๊ณ„ ์‚ฐ์ถœ๋ฌผ๊นŒ์ง€ ์ „๋ถ€ ์‚ฌ๋žŒ์„ ํ˜ธ์ถœํ•˜๋Š” **๊ณผ์ž‰ ํŒŒํ‚น**์ด ๋์„ ๊ฒƒ์ด๋‹ค(์—ญ๋Œ€ ํŒŒํ‚น 8๊ฑด ์ค‘ 4๊ฑด์ด ๋ฐ”๋กœ ๊ทธ ์ •๋‹นํ•œ design ๋‹จ๊ณ„์˜€๋‹ค). > **๊ตํ›ˆ: ์—์ด์ „ํŠธ๋ฅผ ๊ณ ์น˜๋Š” ์ˆ˜์ •์— ์ฐฉ์ˆ˜ํ•˜๊ธฐ ์ „์—, ๊ทธ ์‚ฐ์ถœ๋ฌผ์ด "์–ด๋А ๋‹จ๊ณ„์˜ ์ •์ƒ ์‚ฐ์ถœ๋ฌผ" > ์ธ์ง€๋ถ€ํ„ฐ ํ™•์ธํ•˜๋ผ.** ๋‹จ๊ณ„๋ฅผ ๋ชจ๋ฅธ ์ฑ„ ์‚ฐ์ถœ๋ฌผ๋งŒ ๋ณด๋ฉด ์ •์ƒ์„ ๊ฒฐํ•จ์œผ๋กœ ์ฝ๋Š”๋‹ค.
View on GitHub