Skip to content

Commit 0750659

Browse files
github-actions[bot]CopilotCopilot
authored
docs: document --session-state-dir flag and AWF_SESSION_STATE_DIR env var (#1600)
Add the --session-state-dir CLI flag and AWF_SESSION_STATE_DIR environment variable to the documentation, introduced in #1593. - docs/usage.md: add --session-state-dir to the CLI options list (after --proxy-logs-dir), and expand the Agent Session State description to mention the flag's timeout-safe, predictable-path behaviour useful for GitHub Actions artifact uploads - docs/environment.md: add AWF_SESSION_STATE_DIR to the internal variables table and update the note to clarify it is user-configurable Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 8fb875b commit 0750659

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

docs/environment.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,10 @@ The following environment variables are set internally by the firewall and used
102102
| `AWF_DNS_SERVERS` | Comma-separated list of trusted DNS servers | `8.8.8.8,8.8.4.4` |
103103
| `AWF_CHROOT_ENABLED` | Whether chroot mode is enabled | `true` |
104104
| `AWF_HOST_PATH` | Host PATH passed to chroot environment | `/usr/local/bin:/usr/bin` |
105+
| `AWF_SESSION_STATE_DIR` | Directory for Copilot CLI session state output (equivalent to `--session-state-dir`) | *(unset)* |
105106
| `NO_PROXY` | Domains bypassing Squid (host access mode) | `localhost,host.docker.internal` |
106107

107-
**Note:** These are set automatically based on CLI options and should not be overridden manually.
108+
**Note:** Most of these are set automatically based on CLI options and should not be overridden manually. `AWF_SESSION_STATE_DIR` is an exception — it is the environment-variable equivalent of `--session-state-dir` and can be set by users to configure a predictable session-state output path.
108109

109110
## GitHub Actions `setup-*` Tool Availability
110111

docs/usage.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ Options:
5353
allowed to these servers (default: 8.8.8.8,8.8.4.4)
5454
--proxy-logs-dir <path> Directory to save Squid proxy logs to (writes access.log directly to
5555
this directory)
56+
--session-state-dir <path> Directory to save Copilot CLI session state (events.jsonl, session
57+
data). Writes directly during execution (timeout-safe, predictable
58+
path). Also configurable via AWF_SESSION_STATE_DIR env var.
5659
--enable-host-access Enable access to host services via host.docker.internal. Security
5760
warning: When combined with --allow-domains host.docker.internal,
5861
containers can access ANY service on the host machine. (default: false)
@@ -847,9 +850,12 @@ sudo awf \
847850

848851
**Agent Session State:**
849852
- Contains structured conversation data written by Copilot CLI (e.g., `events.jsonl`)
850-
- Location: `/tmp/awf-agent-session-state-<timestamp>/`
853+
- Default location: `/tmp/awf-agent-session-state-<timestamp>/`
851854
- View with: `cat /tmp/awf-agent-session-state-<timestamp>/events.jsonl`
852855
- Useful for triage dashboards, benchmarking, and debugging Copilot CLI runs
856+
- Use `--session-state-dir <path>` (or `AWF_SESSION_STATE_DIR`) to write session state to a
857+
predictable path during execution — ideal for artifact upload in GitHub Actions where the
858+
runner may time out before cleanup completes
853859

854860
**Squid Logs:**
855861
- Contains all HTTP/HTTPS traffic (allowed and denied)

0 commit comments

Comments
 (0)