Skip to content

fix(subagent-log): default AFK_SUBAGENT_LOG to off — raw tool args written without redaction (#1318) - #1359

Merged
griffinwork40 merged 1 commit into
mainfrom
afk/iso-fix-1318-9-g6auy3
Aug 28, 2026
Merged

fix(subagent-log): default AFK_SUBAGENT_LOG to off — raw tool args written without redaction (#1318)#1359
griffinwork40 merged 1 commit into
mainfrom
afk/iso-fix-1318-9-g6auy3

Conversation

@griffinwork40

Copy link
Copy Markdown
Owner

Fixes #1318.

P1 security fix. SubagentLogWriter serialized full OutputEvent objects including raw tool argument payloads (bash commands, file paths, potentially API keys) to disk. This was always-on by default (AFK_SUBAGENT_LOG=1), circumventing the trace subsystem's deliberate privacy posture of storing only inputBytes.

Changed the default to off (AFK_SUBAGENT_LOG=0), consistent with the opt-in posture of AFK_CAPTURE_SUBAGENT_PROMPTS and AFK_CAPTURE_SUBAGENT_OUTPUT.

Changes

  • src/config/env.ts -- removed default: '1', added example: '1'
  • src/agent/subagent/log.ts -- isEnabled() from !== '0' to === '1'
  • src/agent/subagent.ts -- updated inline comment
  • src/agent/subagent/log.test.ts -- updated unset-case expectation
  • docs/env-registry.json + docs/env-registry.md -- synced

Verification

  • 10/10 tests pass
  • pnpm lint clean

@vercel

vercel Bot commented Aug 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agent-afk-docs Building Building Preview Aug 28, 2026 2:09am

@griffinwork40
griffinwork40 merged commit d85e1f1 into main Aug 28, 2026
10 checks passed
@griffinwork40
griffinwork40 deleted the afk/iso-fix-1318-9-g6auy3 branch August 28, 2026 03:28
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.

bug(subagent-log): always-on JSONL logger writes raw toolInput to disk without redaction

1 participant