MCPcopy Create free account
hub / github.com/Noumena-Network/code / shouldSkipPersistence

Method shouldSkipPersistence

src/utils/sessionStorage.ts:1041–1052  ·  view source on GitHub ↗

* True when test env / cleanupPeriodDays=0 / --no-session-persistence / * CLAUDE_CODE_SKIP_PROMPT_HISTORY should suppress all transcript writes. * Shared guard for appendEntry and materializeSessionFile so both skip * consistently. The env var is set by tmuxSocket.ts so Tungsten-spawned

()

Source from the content-addressed store, hash-verified

1039 * test sessions don't pollute the user's --resume list.
1040 */
1041 private shouldSkipPersistence(): boolean {
1042 const allowTestPersistence = isEnvTruthy(
1043 process.env.TEST_ENABLE_SESSION_PERSISTENCE,
1044 )
1045 return (
1046 (getNodeEnv() === 'test' && !allowTestPersistence) ||
1047 getSettings_DEPRECATED()?.cleanupPeriodDays === 0 ||
1048 this.persistenceUnavailable ||
1049 isSessionPersistenceDisabled() ||
1050 isEnvTruthy(process.env.CLAUDE_CODE_SKIP_PROMPT_HISTORY)
1051 )
1052 }
1053
1054 /**
1055 * Create the session file, write cached startup metadata, and flush

Callers 2

appendEntryMethod · 0.95

Calls 3

isEnvTruthyFunction · 0.90
getNodeEnvFunction · 0.85

Tested by

no test coverage detected