Skip to content

fix(miner): forward HOME and the real coding-agent credential to CLI subprocesses - #6901

Merged
JSONbored merged 2 commits into
mainfrom
fix/ams-cli-driver-env-allowlist-6875
Jul 17, 2026
Merged

fix(miner): forward HOME and the real coding-agent credential to CLI subprocesses#6901
JSONbored merged 2 commits into
mainfrom
fix/ams-cli-driver-env-allowlist-6875

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • The claude-cli/codex-cli driver's parentEnv is deliberately, strictly allowlisted and never carried HOME or any credential — a coding-agent subprocess getting the operator's full, unvetted environment is the exact thing that allowlist exists to prevent. Its separate env field ("extra env overlaid on the allowlisted parent") is the intended channel for exactly this kind of deliberately, narrowly forwarded value, but nothing ever populated it — a spawned claude/codex subprocess had no HOME to locate a persisted credential file with, and no credential env var either, unable to authenticate at all, independent of and more fundamental than claude-cli driver's --permission-mode acceptEdits denies every Read/Bash call, silently blocking all real work #6840's separate --permission-mode gap.
  • Resolves only HOME plus the invoked command's own real credential keys (CLAUDE_CODE_OAUTH_TOKEN/ANTHROPIC_API_KEY for claude, OPENAI_API_KEY/CODEX_ACCESS_TOKEN for codex) from the full env this factory already has, command-scoped so an operator with both providers' keys set never leaks the unrelated one — never the raw env object itself, preserving the strict-allowlist boundary for everything else.
  • Also corrects a stale docs/observability.md/ams-observability.mdx claim that tokens_used is always NULL — that predates Extract and persist real coding-agent token usage (Agent SDK usage.input_tokens/output_tokens, CLI JSON output) #5653, which already wired real token accumulation through; confirmed via this fix's own live verification (tokensUsed: 323 on a real successful run).

Closes #6875

Test plan

  • npm run test:ci — green for every check touching this diff (3 unrelated, pre-existing failures from separate main commits — a deleted terraform/ dir, a stale rename string, a stale branding-drift baseline — none touch anything in this PR's diff; flagged separately)
  • Live, authenticated end-to-end reproduction: real HOME + credential passthrough confirmed via a direct driver-level test against a real repo (real Read/Bash tool use, zero denials, real response)

@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 17, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
loopover-ui a1d9504 Commit Preview URL

Branch Preview URL
Jul 17 2026, 11:42 AM

@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Bundle Report

Changes will increase total bundle size by 39 bytes (0.0%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
loopover-ui 7.54MB 39 bytes (0.0%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: loopover-ui

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/add-scalar-classes-DaVRtc17.js (New) 2.17MB 2.17MB 100.0% 🚀
assets/tanstack-vendor-DKUugAu6.js (New) 711.96kB 711.96kB 100.0% 🚀
assets/docs.fumadocs-spike-api-reference-LMUXMCge.js (New) 442.94kB 442.94kB 100.0% 🚀
assets/AgentScalarChatInterface.vue-DeOZdIFZ.js (New) 201.72kB 201.72kB 100.0% 🚀
assets/modal-BM4hEg9n.js (New) 184.28kB 184.28kB 100.0% 🚀
assets/client-BRkSc1yt.js (New) 146.06kB 146.06kB 100.0% 🚀
assets/maintainer-panel-CN7JA2xr.js (New) 75.89kB 75.89kB 100.0% 🚀
assets/ui-vendor-DiRkEdsV.js (New) 65.93kB 65.93kB 100.0% 🚀
assets/app.analytics-B_3C06Re.js (New) 34.88kB 34.88kB 100.0% 🚀
assets/routes-CN_yWpvx.js (New) 33.99kB 33.99kB 100.0% 🚀
assets/app.operator-B539ZamX.js (New) 27.64kB 27.64kB 100.0% 🚀
assets/owner-panel-pd65miBQ.js (New) 26.97kB 26.97kB 100.0% 🚀
assets/app-BMVhwE51.js (New) 25.79kB 25.79kB 100.0% 🚀
assets/app.runs-BskLDkCZ.js (New) 23.36kB 23.36kB 100.0% 🚀
assets/miner-panel-LtzK0f02.js (New) 20.45kB 20.45kB 100.0% 🚀
assets/ams-observability-D3scq8Z2.js (New) 20.15kB 20.15kB 100.0% 🚀
assets/docs-source-QsihzAMT.js (New) 19.3kB 19.3kB 100.0% 🚀
assets/api._op-BIt0420u.js (New) 17.84kB 17.84kB 100.0% 🚀
assets/self-hosting-docs-audit-CCvuPHAm.js (New) 16.73kB 16.73kB 100.0% 🚀
assets/app.index-hPyhc9ON.js (New) 16.14kB 16.14kB 100.0% 🚀
assets/playground-panel-pb9RJX_S.js (New) 14.38kB 14.38kB 100.0% 🚀
assets/app.config-generator-DK4OTiDI.js (New) 9.87kB 9.87kB 100.0% 🚀
assets/app.audit-U9Evr-Z6.js (New) 9.57kB 9.57kB 100.0% 🚀
assets/extension-BcyEMRXU.js (New) 9.17kB 9.17kB 100.0% 🚀
assets/maintainers-rp6S_0Q5.js (New) 8.06kB 8.06kB 100.0% 🚀
assets/miners-BwMH1aoz.js (New) 7.89kB 7.89kB 100.0% 🚀
assets/agents-CGCuzAQT.js (New) 7.76kB 7.76kB 100.0% 🚀
assets/commands-panel-MK5J-mq3.js (New) 6.68kB 6.68kB 100.0% 🚀
assets/roadmap-nxXvnjOJ.js (New) 6.33kB 6.33kB 100.0% 🚀
assets/digest-panel-CL0wlQ8L.js (New) 6.29kB 6.29kB 100.0% 🚀
assets/docs.index-LbQcSoa3.js (New) 5.42kB 5.42kB 100.0% 🚀
assets/repos._owner._repo.quality-BFxwyRky.js (New) 5.09kB 5.09kB 100.0% 🚀
assets/api.index-B-JKJWSC.js (New) 4.74kB 4.74kB 100.0% 🚀
assets/changelog-DfM20K9r.js (New) 4.67kB 4.67kB 100.0% 🚀
assets/api-DsvvwV2l.js (New) 2.69kB 2.69kB 100.0% 🚀
assets/docs-D_H2JQfu.js (New) 2.67kB 2.67kB 100.0% 🚀
assets/button-CupTvBTC.js (New) 1.74kB 1.74kB 100.0% 🚀
assets/app.workbench-O0iQKwJi.js (New) 1.63kB 1.63kB 100.0% 🚀
assets/tooltip-B9Z9AjgD.js (New) 1.45kB 1.45kB 100.0% 🚀
assets/session-CCTBagsa.js (New) 1.44kB 1.44kB 100.0% 🚀
assets/tabs-DaKtK-I8.js (New) 1.39kB 1.39kB 100.0% 🚀
assets/trend-chart-CBYQijFK.js (New) 1.22kB 1.22kB 100.0% 🚀
assets/app.repos-3mfSOhjC.js (New) 1.07kB 1.07kB 100.0% 🚀
assets/analytics-card-shell-BPeNrs3D.js (New) 987 bytes 987 bytes 100.0% 🚀
assets/use-api-resource-7UQQ6vgp.js (New) 934 bytes 934 bytes 100.0% 🚀
assets/refresh-meta-CgiUKlvP.js (New) 797 bytes 797 bytes 100.0% 🚀
assets/input-BViwVysQ.js (New) 796 bytes 796 bytes 100.0% 🚀
assets/file-cog-BWLN6DDH.js (New) 758 bytes 758 bytes 100.0% 🚀
assets/docs.ai-summaries-HJCQh4qR.js (New) 568 bytes 568 bytes 100.0% 🚀
assets/docs.branch-analysis-BpB24dyk.js (New) 562 bytes 562 bytes 100.0% 🚀
assets/docs.scoreability-DNkUlUO7.js (New) 562 bytes 562 bytes 100.0% 🚀
assets/docs.upstream-drift-CveMiJ8Z.js (New) 562 bytes 562 bytes 100.0% 🚀
assets/docs.federated-fleet-intelligence-C_-BhP9G.js (New) 561 bytes 561 bytes 100.0% 🚀
assets/docs.maintainer-install-trust-CHLgGULF.js (New) 561 bytes 561 bytes 100.0% 🚀
assets/docs.self-hosting-ai-providers-CDxCQqZ0.js (New) 561 bytes 561 bytes 100.0% 🚀
assets/docs.self-hosting-backup-scaling-Cwcy2CLw.js (New) 561 bytes 561 bytes 100.0% 🚀
assets/docs.self-hosting-configuration-RifcoWzH.js (New) 561 bytes 561 bytes 100.0% 🚀
assets/docs.self-hosting-docs-audit-CtJwDoDJ.js (New) 561 bytes 561 bytes 100.0% 🚀
assets/docs.self-hosting-github-app-DA3h8ceU.js (New) 561 bytes 561 bytes 100.0% 🚀
assets/docs.self-hosting-quickstart-C54QAuV4.js (New) 561 bytes 561 bytes 100.0% 🚀
assets/docs.self-hosting-rag-CP_fmo3U.js (New) 561 bytes 561 bytes 100.0% 🚀
assets/docs.self-hosting-rees-DCGtho4C.js (New) 561 bytes 561 bytes 100.0% 🚀
assets/docs.self-hosting-rees-analyzers-Cf4GTwUY.js (New) 561 bytes 561 bytes 100.0% 🚀
assets/docs.self-hosting-release-checklist-juD59IlI.js (New) 561 bytes 561 bytes 100.0% 🚀
assets/docs.self-hosting-releases-LXfQfGJR.js (New) 561 bytes 561 bytes 100.0% 🚀
assets/docs.self-hosting-security-C8u5lxjR.js (New) 561 bytes 561 bytes 100.0% 🚀
assets/docs.self-hosting-troubleshooting-yykvbRC_.js (New) 561 bytes 561 bytes 100.0% 🚀
assets/docs.self-hosting-unified-ams-orb-CDXVkIxr.js (New) 561 bytes 561 bytes 100.0% 🚀
assets/docs.beta-onboarding-CbnRXua-.js (New) 560 bytes 560 bytes 100.0% 🚀
assets/docs.maintainer-self-hosting-Ceoruaj7.js (New) 560 bytes 560 bytes 100.0% 🚀
assets/docs.mcp-clients-BGFAz9Mq.js (New) 560 bytes 560 bytes 100.0% 🚀
assets/docs.owner-checklist-CJtAe61I.js (New) 560 bytes 560 bytes 100.0% 🚀
assets/docs.quickstart-AKc_kQ9G.js (New) 560 bytes 560 bytes 100.0% 🚀
assets/docs.ams-config-precedence-CCZKktcq.js (New) 559 bytes 559 bytes 100.0% 🚀
assets/docs.ams-deployment-Dz-frq0I.js (New) 559 bytes 559 bytes 100.0% 🚀
assets/docs.ams-discovery-plane-DslUNgTE.js (New) 559 bytes 559 bytes 100.0% 🚀
assets/docs.ams-env-reference-B2h76dOE.js (New) 559 bytes 559 bytes 100.0% 🚀
assets/docs.ams-fleet-manifest-C_pIn6Ku.js (New) 559 bytes 559 bytes 100.0% 🚀
assets/docs.ams-goal-spec-D3J3PTDI.js (New) 559 bytes 559 bytes 100.0% 🚀
assets/docs.ams-observability-BT4G9UA2.js (New) 559 bytes 559 bytes 100.0% 🚀
assets/docs.ams-operations-runbook-Jp2MO5q7.js (New) 559 bytes 559 bytes 100.0% 🚀
assets/docs.ams-sizing-B-AoDock.js (New) 559 bytes 559 bytes 100.0% 🚀
assets/docs.ams-unattended-scheduling-CcJ9Z_16.js (New) 559 bytes 559 bytes 100.0% 🚀
assets/docs.github-app-6o35wOP2.js (New) 558 bytes 558 bytes 100.0% 🚀
assets/docs.maintainer-workflow-Nq_kGbFQ.js (New) 558 bytes 558 bytes 100.0% 🚀
assets/docs.privacy-security-DzSxWKm3.js (New) 558 bytes 558 bytes 100.0% 🚀
assets/docs.troubleshooting-flrDS6hk.js (New) 558 bytes 558 bytes 100.0% 🚀
assets/docs.tuning-Dki-isxu.js (New) 558 bytes 558 bytes 100.0% 🚀
assets/docs.loopover-commands-CYwkmUGw.js (New) 557 bytes 557 bytes 100.0% 🚀
assets/docs.how-reviews-work-DRQ71wDE.js (New) 556 bytes 556 bytes 100.0% 🚀
assets/app.maintainer-DppUV3tI.js (New) 502 bytes 502 bytes 100.0% 🚀
assets/sparkles-C3tuuxcK.js (New) 494 bytes 494 bytes 100.0% 🚀
assets/app.owner-CBHiDCez.js (New) 474 bytes 474 bytes 100.0% 🚀
assets/app.commands-OCBtZ3Ek.js (New) 455 bytes 455 bytes 100.0% 🚀
assets/app.playground-BBSuB1zH.js (New) 442 bytes 442 bytes 100.0% 🚀
assets/reveal-ChfwMiPq.js (New) 442 bytes 442 bytes 100.0% 🚀
assets/index-CdIvkQwt.js (New) 438 bytes 438 bytes 100.0% 🚀
assets/app.digest-HbynUUSh.js (New) 430 bytes 430 bytes 100.0% 🚀
assets/eye-off-CFs4Uwp7.js (New) 430 bytes 430 bytes 100.0% 🚀
assets/app.miner-CrEPtkOC.js (New) 422 bytes 422 bytes 100.0% 🚀
assets/key-round-D8mHBuE3.js (New) 355 bytes 355 bytes 100.0% 🚀
assets/bot-Ct2En52w.js (New) 328 bytes 328 bytes 100.0% 🚀
assets/trash-2-C8eF24IF.js (New) 328 bytes 328 bytes 100.0% 🚀
assets/save-BXzTUbMk.js (New) 327 bytes 327 bytes 100.0% 🚀
assets/git-pull-request-arrow-CHKs2TTh.js (New) 321 bytes 321 bytes 100.0% 🚀
assets/shield-check-D_Cs_YGx.js (New) 320 bytes 320 bytes 100.0% 🚀
assets/wrench-D7MWcjeh.js (New) 303 bytes 303 bytes 100.0% 🚀
assets/bell-BUWatZV7.js (New) 290 bytes 290 bytes 100.0% 🚀
assets/data-table-B7wwHGVz.js (New) 289 bytes 289 bytes 100.0% 🚀
assets/list-checks-DHngeUMv.js (New) 279 bytes 279 bytes 100.0% 🚀
assets/shield-Dfh2vMt6.js (New) 272 bytes 272 bytes 100.0% 🚀
assets/workflow-D8evBC5z.js (New) 265 bytes 265 bytes 100.0% 🚀
assets/chart-column-D8Gjx4-K.js (New) 251 bytes 251 bytes 100.0% 🚀
assets/compass-DPrCRBQb.js (New) 251 bytes 251 bytes 100.0% 🚀
assets/skeleton-760Bwq2E.js (New) 241 bytes 241 bytes 100.0% 🚀
assets/history-CDYqwKkn.js (New) 237 bytes 237 bytes 100.0% 🚀
assets/activity-D6uzjJJG.js (New) 234 bytes 234 bytes 100.0% 🚀
assets/message-square-DSvPdc7F.js (New) 233 bytes 233 bytes 100.0% 🚀
assets/download-Bh3aUS_B.js (New) 232 bytes 232 bytes 100.0% 🚀
assets/chevron-right-CeDKqvkD.js (New) 207 bytes 207 bytes 100.0% 🚀
assets/lock-CRAzcfqQ.js (New) 206 bytes 206 bytes 100.0% 🚀
assets/rotate-cw-Cn8-d-lG.js (New) 201 bytes 201 bytes 100.0% 🚀
assets/play-C7CMlTL2.js (New) 190 bytes 190 bytes 100.0% 🚀
assets/circle-check-C2XO2lcV.js (New) 178 bytes 178 bytes 100.0% 🚀
assets/search-w4dLPCoq.js (New) 174 bytes 174 bytes 100.0% 🚀
assets/self-hosting-docs-audit-C_fOu-fb.js (New) 141 bytes 141 bytes 100.0% 🚀
assets/ams-observability-BSjcwLEr.js (New) 140 bytes 140 bytes 100.0% 🚀
assets/circle-BoMmGnFU.js (New) 130 bytes 130 bytes 100.0% 🚀
assets/modal-D6fzl-S1.js (New) 115 bytes 115 bytes 100.0% 🚀
assets/add-scalar-classes-BvmT9adS.js (Deleted) -2.17MB 0 bytes -100.0% 🗑️
assets/tanstack-vendor-BZyvuthF.js (Deleted) -711.96kB 0 bytes -100.0% 🗑️
assets/docs.fumadocs-spike-api-reference-D3ZXoHfN.js (Deleted) -442.94kB 0 bytes -100.0% 🗑️
assets/AgentScalarChatInterface.vue-VvMypN0r.js (Deleted) -201.72kB 0 bytes -100.0% 🗑️
assets/modal-C91rW48p.js (Deleted) -184.28kB 0 bytes -100.0% 🗑️
assets/client-BPvx_g_r.js (Deleted) -146.06kB 0 bytes -100.0% 🗑️
assets/maintainer-panel-CCTSi3eg.js (Deleted) -75.89kB 0 bytes -100.0% 🗑️
assets/ui-vendor-BdwWEVtB.js (Deleted) -65.93kB 0 bytes -100.0% 🗑️
assets/app.analytics-CGlwRXEN.js (Deleted) -34.88kB 0 bytes -100.0% 🗑️
assets/routes-DAcyH4Sb.js (Deleted) -33.99kB 0 bytes -100.0% 🗑️
assets/app.operator-_NYMIoPw.js (Deleted) -27.64kB 0 bytes -100.0% 🗑️
assets/owner-panel-C7cNEqyC.js (Deleted) -26.97kB 0 bytes -100.0% 🗑️
assets/app-0UrpVmRB.js (Deleted) -25.79kB 0 bytes -100.0% 🗑️
assets/app.runs-CEtyJwyt.js (Deleted) -23.36kB 0 bytes -100.0% 🗑️
assets/miner-panel-B-QHS0ZN.js (Deleted) -20.45kB 0 bytes -100.0% 🗑️
assets/ams-observability-CDwCXPfC.js (Deleted) -20.11kB 0 bytes -100.0% 🗑️
assets/docs-source-CMrzs2-9.js (Deleted) -19.3kB 0 bytes -100.0% 🗑️
assets/api._op-D_mgpadV.js (Deleted) -17.84kB 0 bytes -100.0% 🗑️
assets/self-hosting-docs-audit-pDTEifgF.js (Deleted) -16.73kB 0 bytes -100.0% 🗑️
assets/app.index-G8WSnYsv.js (Deleted) -16.14kB 0 bytes -100.0% 🗑️
assets/playground-panel-mHNfkJb2.js (Deleted) -14.38kB 0 bytes -100.0% 🗑️
assets/app.config-generator-BnM2aFSz.js (Deleted) -9.87kB 0 bytes -100.0% 🗑️
assets/app.audit-CzabV-Q6.js (Deleted) -9.57kB 0 bytes -100.0% 🗑️
assets/extension-D9pNQEi0.js (Deleted) -9.17kB 0 bytes -100.0% 🗑️
assets/maintainers-AY8dloOm.js (Deleted) -8.06kB 0 bytes -100.0% 🗑️
assets/miners-CWVlGiCC.js (Deleted) -7.89kB 0 bytes -100.0% 🗑️
assets/agents-7vhe7a-H.js (Deleted) -7.76kB 0 bytes -100.0% 🗑️
assets/commands-panel-B0oArHH2.js (Deleted) -6.68kB 0 bytes -100.0% 🗑️
assets/roadmap-Df0dP51U.js (Deleted) -6.33kB 0 bytes -100.0% 🗑️
assets/digest-panel-Dr9qkkUY.js (Deleted) -6.29kB 0 bytes -100.0% 🗑️
assets/docs.index-Cwk4FlJi.js (Deleted) -5.42kB 0 bytes -100.0% 🗑️
assets/repos._owner._repo.quality-D7mi96Q3.js (Deleted) -5.09kB 0 bytes -100.0% 🗑️
assets/api.index-lRNjv2kB.js (Deleted) -4.74kB 0 bytes -100.0% 🗑️
assets/changelog-CJ36T3C9.js (Deleted) -4.67kB 0 bytes -100.0% 🗑️
assets/api-DHBUK9lp.js (Deleted) -2.69kB 0 bytes -100.0% 🗑️
assets/docs-DoccSaOu.js (Deleted) -2.67kB 0 bytes -100.0% 🗑️
assets/button-1EJJ7uxZ.js (Deleted) -1.74kB 0 bytes -100.0% 🗑️
assets/app.workbench-OOVDJQ5T.js (Deleted) -1.63kB 0 bytes -100.0% 🗑️
assets/tooltip-CTwtB0SL.js (Deleted) -1.45kB 0 bytes -100.0% 🗑️
assets/session-JKo4U-1f.js (Deleted) -1.44kB 0 bytes -100.0% 🗑️
assets/tabs-iOz6RXDQ.js (Deleted) -1.39kB 0 bytes -100.0% 🗑️
assets/trend-chart-DYa3Q8qk.js (Deleted) -1.22kB 0 bytes -100.0% 🗑️
assets/app.repos-_SdrO-yn.js (Deleted) -1.07kB 0 bytes -100.0% 🗑️
assets/analytics-card-shell-Boc5cLkT.js (Deleted) -987 bytes 0 bytes -100.0% 🗑️
assets/use-api-resource-C96q_j8H.js (Deleted) -934 bytes 0 bytes -100.0% 🗑️
assets/refresh-meta-FCvnVMtD.js (Deleted) -797 bytes 0 bytes -100.0% 🗑️
assets/input-C3b0sgeC.js (Deleted) -796 bytes 0 bytes -100.0% 🗑️
assets/file-cog-BfHbYRBQ.js (Deleted) -758 bytes 0 bytes -100.0% 🗑️
assets/docs.ai-summaries-HkUrDtji.js (Deleted) -568 bytes 0 bytes -100.0% 🗑️
assets/docs.branch-analysis-lcnnA4lB.js (Deleted) -562 bytes 0 bytes -100.0% 🗑️
assets/docs.scoreability-DJC6AsYO.js (Deleted) -562 bytes 0 bytes -100.0% 🗑️
assets/docs.upstream-drift-DPC-MT9z.js (Deleted) -562 bytes 0 bytes -100.0% 🗑️
assets/docs.federated-fleet-intelligence-B11K_NAY.js (Deleted) -561 bytes 0 bytes -100.0% 🗑️
assets/docs.maintainer-install-trust-CvIhJWGo.js (Deleted) -561 bytes 0 bytes -100.0% 🗑️
assets/docs.self-hosting-ai-providers-VMltf03d.js (Deleted) -561 bytes 0 bytes -100.0% 🗑️
assets/docs.self-hosting-backup-scaling-DgjBylfb.js (Deleted) -561 bytes 0 bytes -100.0% 🗑️
assets/docs.self-hosting-configuration-BkX67kq3.js (Deleted) -561 bytes 0 bytes -100.0% 🗑️
assets/docs.self-hosting-docs-audit-CSrykyph.js (Deleted) -561 bytes 0 bytes -100.0% 🗑️
assets/docs.self-hosting-github-app-CyVxlWc_.js (Deleted) -561 bytes 0 bytes -100.0% 🗑️
assets/docs.self-hosting-quickstart-Dk06Ynqh.js (Deleted) -561 bytes 0 bytes -100.0% 🗑️
assets/docs.self-hosting-rag-CVfxvY1X.js (Deleted) -561 bytes 0 bytes -100.0% 🗑️
assets/docs.self-hosting-rees-CVJxBgNh.js (Deleted) -561 bytes 0 bytes -100.0% 🗑️
assets/docs.self-hosting-rees-analyzers-BJ4j9ZzC.js (Deleted) -561 bytes 0 bytes -100.0% 🗑️
assets/docs.self-hosting-release-checklist-Cka0Nsdh.js (Deleted) -561 bytes 0 bytes -100.0% 🗑️
assets/docs.self-hosting-releases-CIQS92ei.js (Deleted) -561 bytes 0 bytes -100.0% 🗑️
assets/docs.self-hosting-security-DaIP0eBp.js (Deleted) -561 bytes 0 bytes -100.0% 🗑️
assets/docs.self-hosting-troubleshooting-s-XS9Nay.js (Deleted) -561 bytes 0 bytes -100.0% 🗑️
assets/docs.self-hosting-unified-ams-orb-DBIg2VGY.js (Deleted) -561 bytes 0 bytes -100.0% 🗑️
assets/docs.beta-onboarding-Ca_VFoRU.js (Deleted) -560 bytes 0 bytes -100.0% 🗑️
assets/docs.maintainer-self-hosting-BQ2I04hW.js (Deleted) -560 bytes 0 bytes -100.0% 🗑️
assets/docs.mcp-clients-ClVzIQB7.js (Deleted) -560 bytes 0 bytes -100.0% 🗑️
assets/docs.owner-checklist-DKfV5lUR.js (Deleted) -560 bytes 0 bytes -100.0% 🗑️
assets/docs.quickstart-xoVgGm5c.js (Deleted) -560 bytes 0 bytes -100.0% 🗑️
assets/docs.ams-config-precedence-8jnc8eP3.js (Deleted) -559 bytes 0 bytes -100.0% 🗑️
assets/docs.ams-deployment-FaNx8sB0.js (Deleted) -559 bytes 0 bytes -100.0% 🗑️
assets/docs.ams-discovery-plane-BOgPxrqZ.js (Deleted) -559 bytes 0 bytes -100.0% 🗑️
assets/docs.ams-env-reference-8y-Ez7KX.js (Deleted) -559 bytes 0 bytes -100.0% 🗑️
assets/docs.ams-fleet-manifest-CAqOIDnm.js (Deleted) -559 bytes 0 bytes -100.0% 🗑️
assets/docs.ams-goal-spec-DNLhHmZk.js (Deleted) -559 bytes 0 bytes -100.0% 🗑️
assets/docs.ams-observability-8Zlm0i-V.js (Deleted) -559 bytes 0 bytes -100.0% 🗑️
assets/docs.ams-operations-runbook-D9iOC2lZ.js (Deleted) -559 bytes 0 bytes -100.0% 🗑️
assets/docs.ams-sizing-B9wwiF7z.js (Deleted) -559 bytes 0 bytes -100.0% 🗑️
assets/docs.ams-unattended-scheduling-BdeNf6t1.js (Deleted) -559 bytes 0 bytes -100.0% 🗑️
assets/docs.github-app-wI9sRo0c.js (Deleted) -558 bytes 0 bytes -100.0% 🗑️
assets/docs.maintainer-workflow-BdDzd5Cq.js (Deleted) -558 bytes 0 bytes -100.0% 🗑️
assets/docs.privacy-security-C0gKEyuM.js (Deleted) -558 bytes 0 bytes -100.0% 🗑️
assets/docs.troubleshooting-CIQAG-WD.js (Deleted) -558 bytes 0 bytes -100.0% 🗑️
assets/docs.tuning-73Y5h9Ca.js (Deleted) -558 bytes 0 bytes -100.0% 🗑️
assets/docs.loopover-commands-a0dt8tlm.js (Deleted) -557 bytes 0 bytes -100.0% 🗑️
assets/docs.how-reviews-work-DxweMjlQ.js (Deleted) -556 bytes 0 bytes -100.0% 🗑️
assets/app.maintainer-BG5CBi1r.js (Deleted) -502 bytes 0 bytes -100.0% 🗑️
assets/sparkles-B2Jk4LlC.js (Deleted) -494 bytes 0 bytes -100.0% 🗑️
assets/app.owner-BcsXWISL.js (Deleted) -474 bytes 0 bytes -100.0% 🗑️
assets/app.commands-CVChd6zR.js (Deleted) -455 bytes 0 bytes -100.0% 🗑️
assets/app.playground-CU5kD2aF.js (Deleted) -442 bytes 0 bytes -100.0% 🗑️
assets/reveal-B1-TV34z.js (Deleted) -442 bytes 0 bytes -100.0% 🗑️
assets/index-CGhwa-f8.js (Deleted) -438 bytes 0 bytes -100.0% 🗑️
assets/app.digest-DDxpZ8Te.js (Deleted) -430 bytes 0 bytes -100.0% 🗑️
assets/eye-off-DNjyeyns.js (Deleted) -430 bytes 0 bytes -100.0% 🗑️
assets/app.miner-DiukM49p.js (Deleted) -422 bytes 0 bytes -100.0% 🗑️
assets/key-round-B6dMKmHB.js (Deleted) -355 bytes 0 bytes -100.0% 🗑️
assets/bot-BCixX5Vu.js (Deleted) -328 bytes 0 bytes -100.0% 🗑️
assets/trash-2-B7T_x5Pg.js (Deleted) -328 bytes 0 bytes -100.0% 🗑️
assets/save-C0g8GZmQ.js (Deleted) -327 bytes 0 bytes -100.0% 🗑️
assets/git-pull-request-arrow-BmIKrqq8.js (Deleted) -321 bytes 0 bytes -100.0% 🗑️
assets/shield-check-BhR-ZTsR.js (Deleted) -320 bytes 0 bytes -100.0% 🗑️
assets/wrench-BI5IW_7h.js (Deleted) -303 bytes 0 bytes -100.0% 🗑️
assets/bell-Cmh4iIYH.js (Deleted) -290 bytes 0 bytes -100.0% 🗑️
assets/data-table-pmZjQ0pR.js (Deleted) -289 bytes 0 bytes -100.0% 🗑️
assets/list-checks-CGDBAYwu.js (Deleted) -279 bytes 0 bytes -100.0% 🗑️
assets/shield-60r6d9hC.js (Deleted) -272 bytes 0 bytes -100.0% 🗑️
assets/workflow-BiSAvwM-.js (Deleted) -265 bytes 0 bytes -100.0% 🗑️
assets/chart-column-BVyJ_xLw.js (Deleted) -251 bytes 0 bytes -100.0% 🗑️
assets/compass-BqoHRUNz.js (Deleted) -251 bytes 0 bytes -100.0% 🗑️
assets/skeleton-DHc-sCfS.js (Deleted) -241 bytes 0 bytes -100.0% 🗑️
assets/history-8n_LmAxQ.js (Deleted) -237 bytes 0 bytes -100.0% 🗑️
assets/activity-BOMI7plX.js (Deleted) -234 bytes 0 bytes -100.0% 🗑️
assets/message-square-YL4pBtp_.js (Deleted) -233 bytes 0 bytes -100.0% 🗑️
assets/download-hleu9SIg.js (Deleted) -232 bytes 0 bytes -100.0% 🗑️
assets/chevron-right-CTozURTq.js (Deleted) -207 bytes 0 bytes -100.0% 🗑️
assets/lock-DEKfAzy7.js (Deleted) -206 bytes 0 bytes -100.0% 🗑️
assets/rotate-cw-CzMfRF0n.js (Deleted) -201 bytes 0 bytes -100.0% 🗑️
assets/play-Cuav828c.js (Deleted) -190 bytes 0 bytes -100.0% 🗑️
assets/circle-check-i62A6rQ3.js (Deleted) -178 bytes 0 bytes -100.0% 🗑️
assets/search-CdZjeIVP.js (Deleted) -174 bytes 0 bytes -100.0% 🗑️
assets/self-hosting-docs-audit-CudRPHoT.js (Deleted) -141 bytes 0 bytes -100.0% 🗑️
assets/ams-observability-DAYxG1nB.js (Deleted) -140 bytes 0 bytes -100.0% 🗑️
assets/circle-Cr-ODgL1.js (Deleted) -130 bytes 0 bytes -100.0% 🗑️
assets/modal-DB5a-Yyr.js (Deleted) -115 bytes 0 bytes -100.0% 🗑️

…subprocesses

The claude-cli/codex-cli driver's parentEnv is deliberately, strictly
allowlisted and never carries HOME or any credential (a coding-agent
subprocess getting the operator's full, unvetted environment is the
exact thing that allowlist exists to prevent). Its separate `env`
field ("extra env overlaid on the allowlisted parent") is the
intended channel for exactly this kind of deliberately, narrowly
forwarded value, but nothing ever populated it -- a spawned claude/
codex subprocess had no HOME to locate a persisted credential file
with, and no credential env var either, unable to authenticate at
all, independent of and more fundamental than #6840's separate
--permission-mode gap.

Resolves only HOME plus the invoked command's own real credential
keys (CLAUDE_CODE_OAUTH_TOKEN/ANTHROPIC_API_KEY for claude,
OPENAI_API_KEY/CODEX_ACCESS_TOKEN for codex) from the full env this
factory already has, command-scoped so an operator with both
providers' keys set never leaks the unrelated one -- never the raw
env object itself, preserving the strict-allowlist boundary for
everything else. Confirmed via a live, authenticated end-to-end
reproduction (real Read/Bash tool use, a real committed fix).

Closes #6875
Predates #5653, which wired real per-iteration token accumulation
into finalMeterTotals.tokens -- the pipeline already correctly
persists real tokens_used today; only a genuinely non-running or
non-reporting driver produces an honest 0.
@JSONbored
JSONbored force-pushed the fix/ams-cli-driver-env-allowlist-6875 branch from 0e16bd1 to a1d9504 Compare July 17, 2026 11:40
@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.70%. Comparing base (e118f6e) to head (a1d9504).
⚠️ Report is 5 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6901   +/-   ##
=======================================
  Coverage   93.70%   93.70%           
=======================================
  Files         685      685           
  Lines       68284    68292    +8     
  Branches    18715    18718    +3     
=======================================
+ Hits        63985    63993    +8     
  Misses       3302     3302           
  Partials      997      997           
Flag Coverage Δ
shard-1 43.68% <25.00%> (-0.01%) ⬇️
shard-2 36.79% <75.00%> (+<0.01%) ⬆️
shard-3 32.66% <25.00%> (-0.01%) ⬇️
shard-4 34.77% <62.50%> (+<0.01%) ⬆️
shard-5 31.19% <100.00%> (+0.01%) ⬆️
shard-6 45.68% <25.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ckages/loopover-engine/src/miner/driver-factory.ts 100.00% <100.00%> (ø)

@JSONbored
JSONbored merged commit 4a852de into main Jul 17, 2026
15 checks passed
@JSONbored
JSONbored deleted the fix/ams-cli-driver-env-allowlist-6875 branch July 17, 2026 11:49
@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

claude-cli/codex-cli driver's env allowlist drops HOME and every coding-agent credential

1 participant