Repository navigation
Keep each Session's native state under its own directory - #925
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is D2b protocol PR 1, the Runtime–Harness boundary. One Environment will soon serve several Sessions in sequence. To prepare for that, each Session's native Harness state now lives only under directories derived from its state key,
agent.StateDir(StateRoot|RuntimeRoot, kind, key). While there is one Session per Runtime, nothing else changes. An installation must be reinstalled, not upgraded.Paths
CODEX_HOME<StateRoot>/runtime/codex/state/<key><RuntimeRoot>/runtime/codex/state/<key>CLAUDE_CONFIG_DIR<StateRoot>/runtime/claude_sdk/state/<key>/configHOME,TMPDIRhomeandscratchunder<RuntimeRoot>/runtime/claude_sdk/state/<key>environment: noneCLAUDE_CONFIG_DIR,HOME,TMPDIR, working directoryconfig,home,tmpandworkunder<StateRoot>/runtime/claude_sdk/state/<key>.HOMEused to be the daemon's shared home, where the native CLI writes its MCP logs.Deleted
allocSessionDirand its path sanitizer.WorkspaceConfig.workspaceDirsandworkspaceEnvironment.DiscoveryOptions.Profile, which no adapter reads after this change.daemon/agent-sessionsand profile-levelruntimeentries in the unlabelled-state check.The Claude readiness check now runs with a temporary
HOME,TMPDIRandCLAUDE_CONFIG_DIR, which it discards afterwards.Docs
contracts/agents-api/harness-onboarding.md(Register the adapter), with its zh mirror.Verification
environment: noneHOME) and six Low issues. All are fixed.go testpasses onagent/...andcli. A new two-key test asserts disjoint directories and that the native environment points into them, includingenvironment: none.go vet,check-runtime-contract,check-harness-catalogandcheck-translationspass.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.